Python的字典形式格式化字符
来源:互联网 发布:删除搜狗输入法云计算 编辑:程序博客网 时间:2024/06/05 12:02
方法一:
>>>phonebook = {'Beth': '9102', 'Alice': '2431', 'Cecil': '3258'}
>>>"Cecil's phone number is %(Cecil)s." % phonebook
"Cecil's phone number is 3258."
(摘自Python基础教程(第二版))
方法二:
>>> 'There are %(howmany)d %(lang)s Quotation Symbols' % {'lang': 'Python', 'howmany': 3}
'There are 3 Python Quotation Symbols'
(摘自 core python programming)
- Python的字典形式格式化字符
- python字典的格式化字符串
- Python 字典的格式化转换
- Python字典的json格式化处理
- 练习5:python的格式化字符
- python中用字典格式化字符串
- Python格式化字符
- Python 格式化字符
- Python 格式化字符总结
- python---格式化字符
- Python 格式化字符
- Python 格式化字符分类
- Python格式化字符
- Python格式化字符
- python中的格式化字符
- Python格式化字符
- Python中的格式化字符
- python 格式化字符
- 小记
- 在 Visual C++ 中开发自定义的绘图控件(二)
- ffmpeg yasm not found, use --disable-yasm for a crippled build
- 捕获CHtmlView的滚动条事件
- canvas.rotate(degrees)与canvas.rotate(degrees, px, py)
- Python的字典形式格式化字符
- An Experience of Windows server 8
- (转载)java调用linux命令传递参数问题
- android多线程下载详解
- HDU3577 离散化+线段树
- 利用Handler来更新android的UI
- cocos2d-x环境配置
- 含有字母数字的servlet验证码
- BOJ 331 树形DP