2020年12月24日

python 获取每月的天数

摘要: import calendar monthRange = calendar.monthrange(2020, 12) print(monthRange) #>>> (1, 31) # 输出的是一个元组,第一个元素是所查月份的第一天对应的是星期几(0-6),第二个元素是这个月的天数。 # 以上实例输出 阅读全文

posted @ 2020-12-24 11:38 闹不机米 阅读(3171) 评论(0) 推荐(0) 编辑

导航