這適用於長度超過一個字元的子字串: placeholderCopy astring.count('th') # Out: 1 astring.count('is') # Out: 2 astring.count('text') # Out: 1.
確定! 回上一頁