w3resource

Python Calendar

Calendar

This module allows you to output calendars like the Unix cal program, and provides additional useful functions related to the calendar. By default, these calendars have Monday as the first day of the week, and Sunday as the last (the European convention). Use setfirstweekday() to set the first day of the week to Sunday (6) or to any other weekday. Parameters that specify dates are given as integers. For related functionality, see also the datetime and time modules.

Calender

Test your Python skills with w3resource's quiz



Share this Tutorial / Exercise on : Facebook and Twitter

Python: Tips of the Day

Curries a function:

Example:

from functools import partial

def tips_curry(fn, *args):
  return partial(fn,*args)
add = lambda x, y: x + y
add1 = tips_curry(add, 20)

print(add1(80))

Output:

100