Skip to content

Instantly share code, notes, and snippets.

@kabirahuja2431
Last active October 3, 2019 14:06
Show Gist options
  • Save kabirahuja2431/efc94c8e016c4c678e01de636d140a02 to your computer and use it in GitHub Desktop.
Save kabirahuja2431/efc94c8e016c4c678e01de636d140a02 to your computer and use it in GitHub Desktop.
file = open('path_to/somefile') #Creates an iterator pointing to the first element of a file
for line in file:
print(line)
file.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment