Friday 15 July 2016

Python: Calendar: month_name: Get month names


'calendar.month_name' returns an array that contain month names of the year in current locale. The returned array has length 13, since follows normal convention of January being month number 1.
>>> import calendar
>>> for month in calendar.month_name:
...     print(month)
... 

January
February
March
April
May
June
July
August
September
October
November
December


Previous                                                 Next                                                 Home

No comments:

Post a Comment