代码示例:(标识:python_file_readline_3)
python_file_readline_3.py
f = open("demofile.txt", "r")
for x in f:
  print(x)
运行结果: