Friday, 15 July 2016

Python: Calendar: Get abbreviated month names


'calendar.month_abbr' return an array that contains abbreviated 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_abbr:
...     print(month)
... 

Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec



Previous                                                 Next                                                 Home

No comments:

Post a Comment