将2018-10-21和2019-1-1转化成为“2018年10月21日”输出。原始字符串s=inputdk='年 月 日'
tss3 = "2013/10/10 23:40:00" timeArray = time.strptime(tss3, "%Y/%m/%d %H:%M:%S") otherStyleTime = time.strftime("%Y年%m月%d日", timeArray) print(otherStyleTime)