Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これに関連する多くの質問がありますが、ユーザーが入力した単語を取得して方程式で使用する方法については説明していません。どうすればいいですか?
文字列の長さを調べるには len("string") を使用するということですか?
特殊なタイプの文字数を知りたい場合は、カウンターを使用します
from collections import Counter a = Counter("stringsss") print a['s']