1. 程式人生 > >python開發之路---第三次筆記

python開發之路---第三次筆記

部分字串用法

 

1  s.startswith()  # 以xxxx開頭

2  s.endswith()  # 以xxxx結尾

3 s.split()  #以某個字元分割字串,並以列表的形式儲存

4  isdigit  # 是否是數字

5  replace

6、 find

7、center

8、strip

9、format

10、replace

11、count