month num to name

Json·2022년 4월 11일
0

my_module

목록 보기
12/33
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

0개의 댓글