index
count
sort
部分文字列が出現する回数を返します。
list.count(item)
下記の値を入力するとサンプルに即時反映されます。
print
text = "banana" print(text.count("a")) # 3 print(text.count("an")) # 2