number of days in a month python code example
Example: python get how many days in current month
import calendar
import datetime
now = datetime.datetime.now()
print calendar.monthrange(now.year, now.month)[1]
29
import calendar
import datetime
now = datetime.datetime.now()
print calendar.monthrange(now.year, now.month)[1]
29