Print Calendar Of Any Year With Just 2 Lines Of Code

In this article, I’ll show you those two lines of Python code, using which you can print calendar of any year.

Required Package

The pre-requisite to generate calendar is to import the required package named calendar as shown below:

from calendar import *

Generate Calendar

Now to generate a calendar, we need to call constructor and pass in four parameters as shown below:

print(calendar(2018,2,1…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store