摘要: 格式化一个字符串的输出结果,我们在很多地方都可以看到,如:c/c++中都有见过 下面看看python中的字符串格式函数str.format(): 1 #使用str.format()函数 2 3 #使用'{}'占位符 4 print('I\'m {},{}'.format('Hongten','Wel 阅读全文
posted @ 2016-11-24 09:31 conanwang 阅读(614) 评论(0) 推荐(0)