You can see the available function of Python’s datetime in docs – https://docs.python.org/2/library/datetime.html
Alternatively, Python also gives a Calendar module. – https://docs.python.org/2/library/calendar.html
You just need to do this:
import calendar
c = calendar.TextCalendar()
c.prmonth(2010,1)