In [1]:
import calendar
In [2]:
print(calendar.monthrange(2019, 1))
In [3]:
print(calendar.monthrange(2019, 1)[1])
In [4]:
print(calendar.monthrange(2019, 2)[1])
In [5]:
print(calendar.monthrange(2020, 2)[1])
In [6]:
print(calendar.monthlen(2019, 1))
In [7]:
print(calendar.__all__)
In [8]:
print('monthlen' in calendar.__all__)
In [9]:
print('monthrange' in calendar.__all__)