with open("d:\\a100.txt", mode="r+", encoding='UTF-8') as ff:
while True:
l=ff.readline()
if l == "": break#如果l读到是空值,则跳出循环
print(l.strip())
转载于:https://www.cnblogs.com/yang30293316/p/11272086.html
with open("d:\\a100.txt", mode="r+", encoding='UTF-8') as ff:
while True:
l=ff.readline()
if l == "": break#如果l读到是空值,则跳出循环
print(l.strip())
转载于:https://www.cnblogs.com/yang30293316/p/11272086.html