Skip to content

Instantly share code, notes, and snippets.

@matlink
Created February 14, 2018 09:57
Show Gist options
  • Save matlink/af79d68b5e80624198e09e6d8ab42c73 to your computer and use it in GitHub Desktop.
Save matlink/af79d68b5e80624198e09e6d8ab42c73 to your computer and use it in GitHub Desktop.
iterate over lines
with open(filename) as _buffer:
for word in _buffer:
word = word.rstrip('\r\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment