This program is meant to read one file, and then create another file with the list in reverse. The first file reads
Luke 19
Anakin 45
Han 35
Leia 19
Obiwan 70
Yoda 400
The 2nd file should be this list in reverse, with Yoda 400 first then Luke 19 last. I am getting an error with the program with using the reverse() function and it says that the object has no attribute "reverse".
Edit: Suggested post doesn't create a new file with the list in reverse, it just prints it again in reverse.
f = open("file1.txt","r")
f1 = open("file2.txt","w")
f1.write(f.reverse())