Pythonリストcount
index

countリスト

sort

部分文字列が出現する回数を返します。

構文

list.count(item)

使用例

下記の値を入力するとサンプルに即時反映されます。

print
text = "banana"
print(text.count("a"))   # 3
print(text.count("an"))  # 2