Python3如何计算时间,并垂直",".join()显示?

a = 时间:世纪,年,月,周,日,时,分,秒
b = 计算:1世纪,100年,12x100年

常见的日期时间计算都在下边了,没有世纪,年year//100就是世纪

>>> import datetime as dt
>>> today = dt.date.today()
>>> today
datetime.date(2022, 6, 26)
>>> now = dt.datetime.now()
>>> now
datetime.datetime(2022, 6, 26, 6, 2, 8, 858025)
>>> now.timetuple()
time.struct_time(tm_year=2022, tm_mon=6, tm_mday=26, tm_hour=6, tm_min=2, tm_sec=8, tm_wday=6, tm_yday=177, tm_isdst=-1)
>>> list(now.timetuple())
[2022, 6, 26, 6, 2, 8, 6, 177, -1]
>>> lst = list(now.timetuple())[:-1]
>>> print('\n'.join(map(str,lst)))
2022
6
26
6
2
8
177  #一年中的第几天
>>> now.year
2022
>>> now.month
6
>>> now.day
26
>>> now.hour
6
>>> now.minute
2
>>> now.second
8
>>> now.isocalendar()
(2022, 25, 7)
>>> now.isocalendar()[1] #一年中的第几周
25
>>> now.isocalendar()[2] #一周中的第几天
7