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

Python2.6与Python2.7的format用法区别

时间:2018-03-15 22:12:38      阅读:278      评论:0      收藏:0      [点我收藏+]

标签:python2.6   gpo   val   blog   post   error   err   log   mat   

Python2.6不支持format(123456L, ",")或format(123, ",")的format用法,会报下面的错误

ValueError: Unknown format code ‘,‘ for object of type ‘long‘

 ValueError: Unknown format code ‘,‘ for object of type ‘int‘

Python2.7支持format(123456L, ",")或format(123, ",")

Python2.6与Python2.7的format用法区别

标签:python2.6   gpo   val   blog   post   error   err   log   mat   

原文地址:https://www.cnblogs.com/yizipiaoxiang/p/8576368.html

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