The program starts by importing the monthrange function from the calendar module in the Python Standard Library. Two variables, year and month, are created and set to the values 2014 and 6, respectively.
The monthrange function is called with the year and month as arguments, which returns a tuple with two values: the first day of the week of the first day of the month (where Monday is 0 and Sunday is 6), and the number of days in the month. Finally, the result of the function call is printed using the print function.
from calendar import monthrange year = 2014 month = 6 print(monthrange(year, month))
(6, 30)
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions