Skip to content

Instantly share code, notes, and snippets.

@gsathya
Created January 18, 2012 15:32
Show Gist options
  • Save gsathya/1633548 to your computer and use it in GitHub Desktop.
Save gsathya/1633548 to your computer and use it in GitHub Desktop.
Similar to tail
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