Python Glossary Русский

all Python 3calendarfunction

calendar.prmonth()

printing calendars

Prints a calendar of one month to standard output — the same as print(month(...)) in one call.

Syntax

calendar.prmonth(theyear, themonth, w=0, l=0)

It returns None: storing the result in a variable gives None, and print(calendar.prmonth(...)) prints it as well. calendar.month() returns the string. The first weekday comes from the global setfirstweekday().

Examples

import calendar
result = calendar.prmonth(2024, 2)
print(result)  # → None

See also

Common errors

Open in the full glossarydocs.python.orgReport an inaccuracy