作者OnoderaHaru (小野寺春)
看板Python
标题Re: [问题] 回圈问题
时间Wed Feb 23 23:15:17 2022
第三方模组我比较喜欢用 arrow
import arrow
start = arrow.get('2018-06')
end = arrow.get('2019-12')
for date in arrow.Arrow.range('month', start, end):
print(date.format('YYYY/M'))
--
小野寺春が大好きだよ~
https://i.imgur.com/p7jq5X0.gif
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 223.139.194.239 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1645629321.A.2A4.html
1F:推 skyleona: 感谢O大解答 02/24 00:21