当前位置: 移动技术网 > IT编程>脚本编程>Python > python输出指定月份日历的方法

python输出指定月份日历的方法

2018年06月28日  | 移动技术网IT编程  | 我要评论

赛尔号外i挂无毒下载,台湾神仙膏,招警

本文实例讲述了python输出指定月份日历的方法。分享给大家供大家参考。具体实现方法如下:

#!/usr/bin/python
import calendar
cal = calendar.month(2008, 1)
print "Here is the calendar:"
print cal;

运行结果如下:

Here is the calendar:
  January 2008
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

希望本文所述对大家的Python程序设计有所帮助。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网