导图社区 python第二天学习
python第二天学习的学校思维导图,经过今天的学习,了解了一些字符串的使用
这是python写的第一个文字游戏的逻辑描述
pyton学习的第三天,速度明显变慢了,后面要抽出更多的时间来了
社区模板帮助中心,点此进入>>
英语词性
互联网9大思维
组织架构-单商户商城webAPP 思维导图。
法理
刑法总则
【华政插班生】文学常识-先秦
【华政插班生】文学常识-秦汉
文学常识:魏晋南北朝
【华政插班生】文学常识-隋唐五代
【华政插班生】文学常识-两宋
字符串
字符串连接
in 'a'+'b;
out 'ab'
字符串多次连接
in '2'*3
out '222'
字符串切片操作1
in 'python'[1]
out 'y'
字符切片操作2
in 'python' [2,6]
out 'thon'
字符串基础操作1
strip
in ' print'.strip()
out 'print'
in '223332'.strip('2')
out '333'
rstrip
in'22332.rstrip('2")
out'2233
lstrip
in'22332'.lstrip('2')
out'332'
字符串基础操作2
startswith
'python'.startswith(p)
Ture
endswith
'python'.endswith(n)
字符串基础操作3
find
‘print'.find('t')
4
'print'.find('1')
-1
index
'print'.index('p')
0
'print'.index('1')
报错
replace
'print'.replace('p','s')
'srint'
字符串基础操作4
len
len('print')
5
count
'printt'.count('t')
2
upper
'print'.upper()
'PRINT'
loewr
'PRINT'.lower()
'print’
center
'print'.center(10,'2')
'22print222)