码迷,mamicode.com
首页 > 编程语言 > 详细

Python日期和时间

时间:2016-06-09 10:58:57      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:

输出当前时间

import time#引入time模块
print time.strftime("%Y-%m-%d %H:%M:%S",time.localtime())

输出日历

import calendar;
cal = calendar.month(2016,1);
print cal;

Python日期和时间

标签:

原文地址:http://www.cnblogs.com/2star/p/5572064.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!