📜  在 python 代码示例中查找字符

📅  最后修改于: 2022-03-11 14:46:28.027000             🧑  作者: Mango

代码示例2
>>> myString = 'Position of a character'
>>> myString.find('s')
2
>>> myString.find('x')
-1