[Python] python在字符串中查找子字符串 →→→→→进入此内容的聊天室

来自 , 2021-04-17, 写在 Python, 查看 158 次.
URL http://www.code666.cn/view/9d033331
  1. S = 'xxxxSPAMxxxxSPAMxxxx'
  2. where = S.find('SPAM')          # search for position
  3. print where                           # occurs at offset 4

回复 "python在字符串中查找子字符串"

这儿你可以回复上面这条便签

captcha