标签:else mod %s %x 返回 with adl while open
import time
with open(‘db.txt‘,mode=‘at‘,encoding=‘utf_8‘) as f:
f.write(‘%s xiayu\n‘%time.strftime(‘%Y-%m-%d %X‘))
with open(‘db.txt‘,mode=‘rb‘) as f :
f.seek(0,2)
while True:
line=f.readline()
if len(line) == 0:
continue
else:
print(line.decode(‘utf_8‘),end=‘|‘)
#
# def max2(x,y):
# if x>y:
# return x
# else:
# return y
#
# res=max2(20,30)
# print(res*12)
标签:else mod %s %x 返回 with adl while open
原文地址:https://www.cnblogs.com/yanhui1995/p/9685882.html