万年历-C源码(可直接在VC6.0下运行) please select the service you need//用来提示选择执行功能 Search what day is today//用来计算这一天是星期几 Search whether the year is leap year or not//计算是否闰年 Print the calander of the whole year//输出全年的日历 Print the calander of serveral years//输出连续几年
本文实例讲述了python使用calendar输出指定年份全年日历的方法。分享给大家供大家参考。具体实现方法如下:
import calendar
print "Show a given years monthly calendar"
print ''
year = int(raw_input("Enter the year"))
print ''
calendar.prcal(year)
print ''
希望本文所述对大家的Python程序设计有所帮助。