其他分享
首页 > 其他分享> > 06

06

作者:互联网

import time
import datetime
t1 = time.strftime("%H/%M/%S/")
b = datetime.datetime.strptime(f'{t1}','%H/%M/%S/')
t = b.strftime('%H{}%M{}%S{}').format('小时','分','秒',)
print(t)

 

标签:06,format,timeimport,strptime,datetime,strftime
来源: https://www.cnblogs.com/021128yc/p/15450595.html