all Python 3calendarfunction
calendar.prcal()
printing calendars
Prints a calendar for a whole year to standard output — the same as print(calendar(...)) in one call.
Syntax
calendar.prcal(theyear, w=0, l=0, c=6, m=3)
It returns None, so print(calendar.prcal(2024)) appends a stray None. When you need the calendar as a string — for a file, an email or a test — use calendar.calendar(). The w, l, c, m parameters are the same as in calendar().
Examples
import calendar
result = calendar.prcal(2024, m=6)
print(result) # → None
See also
Open in the full glossarydocs.python.orgReport an inaccuracy