python中的iterweekdays()是什么?
iterweekdays()方法。该iterweekdays()方法返回将用于一周的工作日数字的迭代器。
示例
#Write a python program to print iterweekdays() using list import calendar # prints firstweekday starts with 4 th day day= calendar.Calendar(firstweekday = 4) list(day.iterweekdays())
输出结果
[4, 5, 6, 0, 1, 2, 3]
要么
import calendar #prints firstweekday starts with 0 th day variable= calendar.Calendar(firstweekday = 0) for day in variable.iterweekdays(): print(day)
输出结果
0 1 2 3 4 5 6
热门推荐
10 六一婚礼文案祝福语简短
11 足球队祝福语简短
12 婆婆生日祝福语简短的
13 新婚过年祝福语大全简短
14 订婚新发言简短祝福语
15 春天变冷祝福语简短
16 团队文案祝福语简短励志
17 朋友花篮开业祝福语简短
18 祝美术老师祝福语简短