手机
当前位置:查字典教程网 >脚本专栏 >python >python输出指定月份日历的方法
python输出指定月份日历的方法
摘要:本文实例讲述了python输出指定月份日历的方法。分享给大家供大家参考。具体实现方法如下:#!/usr/bin/pythonimportca...

本文实例讲述了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程序设计有所帮助。

【python输出指定月份日历的方法】相关文章:

python两种遍历字典(dict)的方法比较

Python获取当前时间的方法

python中精确输出JSON浮点数的方法

python动态监控日志内容的示例

python类定义的讲解

Python中文件遍历的两种方法

python中stdout输出不缓存的设置方法

用python删除java文件头上版权信息的方法

python 输出一个两行字符的变量

python实现定制交互式命令行的方法

精品推荐
分类导航