I am trying to create a function that can convert a month number to an abbreviated month name or an abbreviated month name to a month number. I thought this might be a commo
You can use below as an alternative.
from time import strptime
strptime('Feb','%b').tm_mon
import calendar
calendar.month_abbr[2] or calendar.month[2]
calendar.month_abbr[2]
calendar.month[2]