Fast forward-backward (write-read)
David Hutto
dwightdhutto at gmail.com
Tue Oct 23 19:19:28 EDT 2012
Whether this is fast enough, or not, I don't know:
filename = "data_file.txt"
f = open(filename, 'r')
forward = [line.rstrip('\n') for line in f.readlines()]
backward = [line.rstrip('\n') for line in reversed(forward)]
f.close()
print forward, "\n\n", "********************\n\n", backward, "\n"
--
Best Regards,
David Hutto
CEO: http://www.hitwebdevelopment.com
More information about the Python-list
mailing list