python 2.5.4 与2.5.5的一个小区别

请看加粗字体的不同:

Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> now = datetime.now()
>>> now
datetime.datetime(2010, 10, 21, 9, 20, 34, 656000)
>>> now.strftime("%Y-%m-%d %H:%M:%S")
'2010-10-21 09:20:34'
>>> now.strftime("%Y-%m-%d %H:%i:%S")
'2010-10-21 09::34'
 
 
 
Python 2.5.5 (r255:77872, Apr 21 2010, 08:44:16)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> now = datetime.now()
>>> now
datetime.datetime(2010, 10, 21, 9, 18, 34, 361812)
>>> now.strftime("%Y-%m-%d %H:%M:%S")
'2010-10-21 09:18:34'
>>> now.strftime("%Y-%m-%d %H:%i:%S")
'2010-10-21 09:%i:34'

>>>

posted on   ddper  阅读(213)  评论(0编辑  收藏  举报

导航

< 2010年10月 >
26 27 28 29 30 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 1 2 3 4 5 6

统计

点击右上角即可分享
微信分享提示