Python学习笔记二——calendar模块

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/shelbaydo/article/details/84668318

calendar.month(2016, 1)方法,以年,月为参数,输出该月的日历

import calendar
 
cal = calendar.month(2016, 1)
print "以下输出2016年1月份的日历:"
print cal
以下输出2016年1月份的日历:
    January 2016
Mo Tu We Th Fr Sa Su
             1  2  3
 4  5  6  7  8  9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

猜你喜欢

转载自blog.csdn.net/shelbaydo/article/details/84668318