How to read a file in reverse order using python? I want to read a file from last line to first line.
def reverse_lines(filename): y=open(filename).readlines() return y[::-1]