发布时间:2019-08-09 10:34:13编辑:auto阅读(2594)
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的并发和异步编程实例
53102
40024
34408
30158
25058
24856
23231
16710
14865
14358
703°
648°
715°
732°
779°
909°
874°
892°
983°
911°