python str.format 和 %占位符 区别
2016-03-13 21:23
585 查看
比如:'%s %s %s' % (1, 2.3, ['one', 'two', 'three'])
它的输出为'1 2.3 ['one', 'two', 'three']',就是按照%左边的标记输出的。
http://www.jb51.net/article/63672.htm
它的输出为'1 2.3 ['one', 'two', 'three']',就是按照%左边的标记输出的。
http://www.jb51.net/article/63672.htm
相关文章推荐
- python ORM 模块peewee(一): 建立数据库对象
- Python设计模式(3)-工厂方法模式
- python(5) - time模块
- leetcode 337. House Robber III-动态规划|Java|Python简洁高效
- Python设计模式(2)-策略模式
- python笔记之字符串格式化
- Python代码风格的良好养成
- Python设计模式(1)-简单工厂模式
- python闭包
- python(5)–sys模块
- Ubuntu 部署Python开发环境
- Python之Django-part 1
- python函数参数注意事项
- python中有关numpy的
- python--文本处理1
- PythonChallenge Mission 5
- python(5)-os模块
- 深度学习进行时间序列模式识别
- python爬取网站图片
- PythonChallenge Mission 4