Python calendar module : iterweekdays() method
Calendar module allows to output calendars like program, and provides additional useful functions related to the calendar. Functions and classes defined in Calendar module use an idealized calendar, the current Gregorian calendar extended indefinitely in both directions.
iterweekdays() method returns an iterator for the week day numbers that will be used for one week. The first number from the iterator will be the same as the number returned by firstweekday().
Syntax: iterweekdays() Parameter: no parameter Returns: iterator for the week day numbers
0 1 2 3 4 5 6
2 3 4 5 6 0 1
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course