I have tried searching, but I havent found exactly what I need. I am using python 3, and I need help writing a text file in reverse order to a different output file.
So this would be the input file
Hey, I am Fred
Fred, what's up
Fred fred fred
And this would be the output file
Fred fred fred
Fred, what's up
Hey, I am Fred
If anyone has any insight into how to accomplish I would really appreciate it,
If input_file is malformed (last line doesn't end with '\n') you may use a quick (maybe not too efficient) hack: