Questions

What is Calendar Module in Python?

The calendar python module is an in-built module in Python that handles operations related to calendars. The output of the module is displayed as a calendar. By default, the first day of the week for the Gregorian calendars is Monday, and the last day is Sunday.

For example:

If you want to generate the calendar for the year 2021, follow the steps given below:

                    

# importing the module

import calendar

# initializing the year

yr = 2021

# printing the calendar for 2021

print(calendar.calendar(yr))


Output:

After compilation, the calendar for the year 2021 will be generated as the output for the above program

Related Questions

Related Topics

Share with friends

Customize your course in 30 seconds

Which class are you in?
5th
6th
7th
8th
9th
10th
11th
12th
Get ready for all-new Live Classes!
Now learn Live with India's best teachers. Join courses with the best schedule and enjoy fun and interactive classes.
tutor
tutor
Ashhar Firdausi
IIT Roorkee
Biology
tutor
tutor
Dr. Nazma Shaik
VTU
Chemistry
tutor
tutor
Gaurav Tiwari
APJAKTU
Physics
Get Started

Leave a Reply

avatar
  Subscribe  
Notify of

Customize your course in 30 seconds

Which class are you in?
No thanks.