📜  最近 n 个月的 python 数组 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:41.048000             🧑  作者: Mango

代码示例1
x = 10 #N Months
now = time.localtime()
print([time.localtime(time.mktime((now.tm_year, now.tm_mon - n, 1, 0, 0, 0, 0, 0, 0)))[:2] for n in range(x)])