Answers for "python get how many days in current month"

0

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
Posted by: Guest on June-17-2020

Python Answers by Framework

Browse Popular Code Answers by Language