发布时间:2019-08-09 10:34:13编辑:auto阅读(2340)
with open('log.txt','rb') as fd:
for i in fd:
offs=-5
while True:
fd.seek(offs,2)
data=fd.readlines()
if len(data) > 1:
print('文件的最后一行是%s' %(data[-1].decode('utf-8')))
break
offs*=2
上一篇: 线性回归与岭回归python代码实现
下一篇: python的并发和异步编程实例
51347
50810
41403
38204
32695
29587
28418
23306
23259
21591
1670°
2401°
2008°
1944°
2277°
1975°
2680°
4481°
4309°
3073°