python 获取日期以及时间

>>> import datetime
>>> 
>>> i = datetime.datetime.now()
>>> print(i.year,i.month,i.day,i.hour,i.minute,i.second)
2020 12 22 06 12 26
>>> 

猜你喜欢

转载自www.cnblogs.com/sea-stream/p/12078850.html