python面试如何以相反顺序展示一个文件的内容?
程序员文章站
2023-11-15 19:06:16
>>> for line in reversed(list(open('Today.txt'))): print(line.rstrip())containeritertools DebuggerThis sem’s subjects Python, C++, JavaHTML, CSS, jQue ......
>>> 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
本文首发于python黑洞网,博客园同步更新