Python字符串常见操作

来源:互联网 发布:家居室内设计软件 编辑:程序博客网 时间:2024/04/30 15:03
  1. 统计字符串中某个字符出现的次数
    1. tempStr = 'Hello world'count = tempStr.count('l')print count#输出结果为 3
  2. 待续
0 0
原创粉丝点击