This is an implementation for reading a file's head or tail with a given -n argument.
Usage
$ python Head.py testcase.txt -n // It reads first ten lines as default.
$ python Head.py testcase.txt -n 45 // It reads first 45 lines in the file.
$ python Tail.py testcase.txt -n // It reads last ten lines as default.
$ python Tail.py testcase.txt -n 45 // It reads last 45 lines in the file.