摘要: #String的内置方法 st='hello world' ★1、print(st.count('l')) #统计元素在字符串的个数 #==> 3 2、print(st.capitalize()) #首字母大写 #==> Hello world ★3、print(st.center(50,'-')) 阅读全文
posted @ 2018-04-30 19:11 Karen,Z 阅读(331) 评论(0) 推荐(0)