How to read a file in reverse order using python? I want to read a file from last line to first line.
with open("filename") as f:
print(f.read()[::-1])