Python__文件习题

1 import time
2 with open('test.txt','rb') as f:
3     f.seek(0)
4     while True:
5         line = f.readline()
6         if line:
7             print(line.decode('utf-8'),end='')
8         else:
9             time.sleep(0.5)
原文地址:https://www.cnblogs.com/wangmengzhu/p/7191139.html