📜  f readlines python not working - Python代码示例

📅  最后修改于: 2022-03-11 14:47:15.247000             🧑  作者: Mango

代码示例1
open('test.txt','r') as f:
    lines = f.readlines()

for line in lines:
    print(line.rstrip('\n'))