📜  阅读自定义分隔符 - Python 代码示例

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

代码示例1
f= open("f.txt",mode='r',encoding='utf8', newline='\r\n')

# use enumerate to show that second line is read as a whole
for i, line in enumerate(fd):   
    print(i, line)