write a program to input any month number between 1 to 12 and print the coressponding month name. For ex-1 for january
Answers
Answered by
2
from datetime import date
months = lambda: dict([(i, date(2021, i, 1).strftime('%B')) for i in range(1, 13)])
print("Month:", months()[(n := int(input("num: ")))])
Answered by
0
Answer:
rom datetime import date
months = lambda: dict([(i, date(2021, i, 1).strftime('%B')) for i in range(1, 13)])
print("Month:", months()[(n := int(input("num: ")))])
Similar questions