Created
August 29, 2013 15:13
-
-
Save scj7t4/6379370 to your computer and use it in GitHub Desktop.
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
f = open(file) | |
contents = f.readlines() | |
while len(contents): | |
line = contents.pop(0) | |
#Then if you need to read another line: | |
#but you'd need to test to make sure the next line is there? | |
if len(contents) > 0: | |
line = contents.pop(0) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment