programming-examples/python/Date/Program to get the last day of a specified year and month.py

4 lines
91 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
import calendar
year = 2015
month = 2
print(calendar.monthrange(year, month)[1])