https://devhubby.com/thread/how-to-read-a-file-in-reverse-order-in-python.