Python常用方法
转化当前时间
# 导入time模块
import time
# 优化格式化化版本 2021-08-18 14:48:26
print(time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time())))
MD5
import hashlib
# md5(alert_id+URL)
str = '123456'
str_md5 = hashlib.md5(str.encode(encoding='utf-8')).hexdigest()
..
原创
2021-08-18 14:56:05 ·
76 阅读 ·
0 评论