Member-only story

Calendar month using Python

Python Coding
Aug 22, 2024

--

import calendar

def display_calendar():

year = int(input("Enter year: "))
month = int(input("Enter month (1-12): "))

cal = calendar.TextCalendar(calendar.SUNDAY)

month_calendar = cal.formatmonth(year, month)
print(month_calendar)

display_calendar()

--

--

Python Coding
Python Coding

Written by Python Coding

Learn python tips and tricks with code I Share your knowledge with us to help society. Python Quiz: https://www.clcoding.com/p/quiz-questions.html

No responses yet