The readlines() function loads the entire file into memory as it runs. A better approach for large files is to use the
fileinput
module, as follows:import fileinput
for line in fileinput.input(['myfile']):
print(line)
0 comments:
Post a Comment
Click to see the code!
To insert emoticon you must added at least one space before the code.