iterating through files with carriage returns

前端 未结 2 594
时光说笑
时光说笑 2021-02-13 22:35

Is there a way to iterate through a text file using the syntax,

with open(filename,\'r\') as f:
  for line in f:
    print f

if the file only c

2条回答
提交回复
热议问题