programming-examples/python/Date/Print a 3-column calendar for an entire year.py

6 lines
242 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
import calendar
cal = calendar.TextCalendar(calendar.SUNDAY)
# year: 2022, column width: 2, lines per week: 1
# number of spaces between month columns: 1
# 3: no. of months per column.
print(cal.formatyear(2022, 2, 1, 1, 3))