How to Display Calendar using Python?

PythonProgramming

<p style="">You can use the calendar module to get the calendar for a given month of a given year in Python. You need to provide the year and month as arguments.&nbsp;</p><h2 style="">example</h2><pre class="prettyprint notranslate">import calendar y = 2017 m = 11 print(calendar.month(y, m))</pre><h2 style="">Output</h2><p>This will give the output &minus;</p><pre class="result notranslate">November 2017 Mo Tu We Th Fr Sa Su &nbsp; &nbsp; &nbsp; 1 &nbsp; 2 &nbsp;3 &nbsp;4 &nbsp;5 6 &nbsp; 7 &nbsp;8 &nbsp;9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30</pre>
raja
Updated on 05-Mar-2020 10:41:43

Advertisements