攻克python3-字符串(第二篇)

1.字符串的创建 name="my name is leBron james" 2.字符串中关于某个字符的功能 name="my name is leBron james" if 'e' in name: #in 判断字符是否在在字符串中 print("e在字符串name中!") print("字符串中e的个数:", name.count("e"))
相关文章
相关标签/搜索