DEV Community

Cover image for How to Print Calendar of Any Year in Python
Ankit Kumar
Ankit Kumar

Posted on • Edited on

How to Print Calendar of Any Year in Python



import calendar 
#This Will import the calendar module
year = int(input("Enter any year: ")) 
#Here we are asking user to input year and we are storing 
#it into year variable.
print(calendar.calendar(year))
#Here we are using calendar method of calendar module and passing 
#year as arguments and this will return us calendar of the year 
#and then with the help of print function we are printing the
#returned data."""

Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay