导图社区 字符串进阶
pyton学习的第三天,速度明显变慢了,后面要抽出更多的时间来了
这是python写的第一个文字游戏的逻辑描述
python第二天学习的学校思维导图,经过今天的学习,了解了一些字符串的使用
社区模板帮助中心,点此进入>>
字符串进阶
主题
%s
'hello %s'%('world')
'hello world'
%d
'%d'%(3)
3
%f
'%f'%(3.14')
3.140000
'%2.f'%(3.14)
3.14
format
'hello {}'.format('world')
hello world
'hello {1}{0}'.format('python','world')
'hello world python'
'hello {1} {0}'.format(1='world',0='python')