w3resource

Python TextCalendar Module : weekheader() method

weekheader() method

The weekheader() method is used to get a header containing abbreviated weekday names.

Syntax:

weekheader(n)

Parameters:

Name Description Required /
Optional
Type
n Specifies the width in characters for one weekday. Required Number

Example of weekheader() method

import calendar
print(calendar.weekheader(3))

Output:

Tue Wed Thu Fri Sat Sun Mon

Previous: weekday()
Next: monthrange()

Test your Python skills with w3resource's quiz



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://198.211.115.131/python/module/calendar/weekheader.php