SyntaxFix
Write A Post
Hire A Developer
Questions
This answer is modified from infrared's answer at Splitting large text file by a delimiter in Python
with open('words.txt') as fp: contents = fp.read() for entry in contents: # do something with entry