We can create a calendar by following the code.
import calendar
# Enter the month and year
year = int(input("Please Enter year: "))
month = int(input("Please Enter month: "))
# display the calendar
print(calendar.month(year, month))
Output:
Please Enter year: 2023
Please Enter month: 9
September 2023
Mo Tu We Th Fr Sa Su
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30