Created
January 18, 2012 15:32
-
-
Save gsathya/1633548 to your computer and use it in GitHub Desktop.
Similar to tail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def tail(filename, n=10): | |
'Return the last n lines of a file' | |
return deque(open(filename), n) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment