2023-06-25 Python - str.count(sub[, start[, end]]):出現回数 重複なし Python3 文字列メソッド 概要 実行結果 表示イメージ 概要str.count(sub[, start[, end]])sub:出現文字 start,end:スライスと同一 出現回数 重複なし 組込み型 文字列メソッド 実行結果 eng= 'abccccg' print(eng.count('c')) print(eng.count('c',1,3)) 表示イメージ 4 1