import datetime month_num = '04' # month_num = 4 will work too month_name = datetime.datetime(1, int(month_num), 1).strftime("%B") print(month_name) >> April