python - Most efficient way to open a file and read the lines? -
i've got this:
vlgastream = open('vlgachcwaves.txt', 'r+') vlgabuffer = vlgastream.readlines() vlgastream.close()
but need way directly , efficiently read of lines file buffer?
iterating on file yields lines.
with open('vlgachcwaves.txt', 'r+') vlgastream: line in vlgastream: dosomethingwith(line)
Comments
Post a Comment