month_dict = { "01": "Jan", "02": "Feb", "03": "Mar", "04": "Apr", "05": "May", "06": "Jun", "07": "Jul", "08": "Aug", "09": "Sep", "10": "Oct", "11": "Nov", "12": "Dec"}
date = “2018-05-22”
day = date[8:] month = month_dict[date[5:7]] year = date[0:4]
print(month + " " + day + ", " + year)
输出结果:
May 22, 2018