首页 > 其他 > 详细

时间监测以及简单函数封装以及返回值

时间:2018-09-21 12:15:15      阅读:172      评论:0      收藏:0      [点我收藏+]
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)

时间监测以及简单函数封装以及返回值

原文:https://www.cnblogs.com/yanhui1995/p/9685882.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!