python 小技巧

small=[chr(i) for i in range(97,123)]#小写字母
small=[chr(i) for i in range(65,91)]#大写字母

 

import time
tt=time.time()
tta=int(tt)
print(tta)
localTime = time.localtime(tta+30)
strTime = time.strftime("%Y-%m-%d %H:%M:%S", localTime)
print(strTime)
#日期时间与整数的相互转换

 

def sjzzs(ta):
    localTime = time.localtime(ta)
    strTime = time.strftime("%Y-%m-%d %H:%M:%S", localTime)
    return strTime

 

posted @ 2021-12-04 06:18  myrj  阅读(33)  评论(0编辑  收藏  举报