python time获取当前时间
import time
t=time.localtime()
t.tm_year,t.tm_mon,t.tm_mday
Out[47]:
(2020, 3, 18)
In [53]:
import datetime
now=datetime.datetime.now()
now.year,now.month,now.day
Out[53]:
(2020, 3, 18)
python time获取当前时间
import time
t=time.localtime()
t.tm_year,t.tm_mon,t.tm_mday
Out[47]:
(2020, 3, 18)
In [53]:
import datetime
now=datetime.datetime.now()
now.year,now.month,now.day
Out[53]:
(2020, 3, 18)