itermonthdays3() : Returns an Iterator of tuples having day , month and year for the month.
Note that tuple will be returned per the days for the week starting from Previous month and for days for the week extended up to next month. Year is our first or 0th element ( item ) of the tuple. Month is the second element ( item ) and day is the third element of the tuples.
import calendar
my_cal= calendar.Calendar()
for x in my_cal.itermonthdays3(2020,7):
print(x)
As we are getting tuple as output, we can get first element ( item ) as year , 2nd as month and 3rd as day the month.
import calendar
my_cal= calendar.Calendar(firstweekday=3)
for x in my_cal.itermonthdays3(2020,7):
print('Year:',x[0],', Month : ',x[1],', Day : ',x[2])