195 viewsJune 3, 2023PythonWrite a code to display the contents of a file in reverse 0 Malarvizhi M416 June 3, 2023 0 Comments To display the contents of a file in reverse, the following code can be used: for line in reversed(list(open(filename.txt))): print(line.rstrip()) Malarvizhi M Asked question June 3, 2023 0 Answers ActiveVotedNewestOldest Register or Login