This method uses DateTime module. The user gives the input for the month number. DateTime.strptime() is called. It takes month number and month format "%m" as arguments. Passing "%b" to strftime returns abbreviated month name while using "%B" returns full month name.
import datetime
#provide month number month_num = "3" datetime_object = datetime.datetime.strptime(month_num, "%m")
import datetime
#provide month number
month_num = "3"
datetime_object = datetime.datetime.strptime(month_num, "%m")
month_name = datetime_object.strftime("%b")
print("Short name: ",month_name)
full_month_name = datetime_object.strftime("%B")
print("Full name: ",full_month_name)
Short name: Mar
Full name: March