Python是否具備字符串「包含」子字符串方法? - Does Python have a string 'contains' substring method?

問題:

I'm looking for a string.contains or string.indexof method in Python. 我正在尋找Python中的string.containsstring.indexof方法。 spa

I want to do: 我想要作: .net

if not somestring.contains("blah"):
   continue

解決方案:

參考一: https://stackoom.com/question/EQ8R/Python是否具備字符串-包含-子字符串方法
參考二: https://oldbug.net/q/EQ8R/Does-Python-have-a-string-contains-substring-method
相關文章
相關標籤/搜索