Quick actions

cmd+k|ctrl+k

Navigation

Languages

Untitled

Snippet info

Language

Python

Visibility

unlisted

Author

legacy-anonymous

Created

2021-06-13T06:09:17.707679Z

Updated

2021-06-13T06:09:17.707679Z

from calendar import monthrange
from datetime import datetime

def month_days(year, month):
    d = monthrange(year, month)
    m = datetime.strptime(str(month), "%m").strftime("%B")
    print(f'{str(m)} has {str(d[1])} days.')

for v in range(1,13):
    month_days(1991, v)
INFO