python字符串讲解
摘要:
s = "abeccc c "s2 = s.strip('c') # 默认去掉字符串两边的空格和换行符print(s2)print(s)print(s.count('c')) # 返回这个值有几个index1 = s.index('c') # 返回第一次出现的位置print(index1)print 阅读全文
posted @ 2019-04-11 21:44 dongxl 阅读(214) 评论(0) 推荐(0)
posted @ 2019-04-11 21:44 dongxl 阅读(214) 评论(0) 推荐(0)
posted @ 2019-04-11 21:43 dongxl 阅读(246) 评论(0) 推荐(0)
posted @ 2019-04-11 21:31 dongxl 阅读(199) 评论(0) 推荐(0)