Anthony Liu wrote:I am wondering if it is possible to start reading from the last line of file, and then the last but one up to the first line.If you can afford to keep the whole file in memory, than: lines = open(..).readlines() print lines[::-1]
Or use the new "reversed" generator to avoid a copy.
for line in reversed(....readlines()): ....
--Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list