输出年/月/日,用“/”分隔,
输出年,月,日,用“,”分隔
用字符串拼接方式输出,格式:2020年9月16日
用python怎么编辑?
是这个意思?
year = '2020'
month = '9'
day = '16'
print("/".join([year,month,day]))
print(",".join([year,month,day]))
print(year+"年"+month+"月"+day+"日")
import time
import locale
locale.setlocale(locale.LC_CTYPE, 'chinese')
print('日期:{}'.format(time.strftime("%Y/%m/%d")))
print('日期:{}'.format(time.strftime("%Y,%m,%d")))
print('日期:{}'.format(time.strftime("%Y年%m月%d日")))