Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This program reads data from a sample text file
- # and prints out the lines of text in reversed order
- # in another text file
- f = open("sample2CAP.txt", "r")
- new_file = open("reversed.txt", "w")
- for line in reversed(list(f)):
- new_file.write(line)
- f.close()
- new_file.close()
Advertisement
Add Comment
Please, Sign In to add comment