How python interview in reverse order to show the contents of a file?

>>> for line in reversed(list(open('Today.txt'))):
print(line.rstrip())
container
itertools

Debugger
This sem’s subjects

Python, C++, Java
HTML, CSS, jQuery, JavaScript

OS, DBMS, DS, ADA

 

This article first appeared in Python black hole net , blog updated simultaneously Park

 

Guess you like

Origin www.cnblogs.com/pythonzhichan/p/11410263.html