题解 | #计算某字符出现次数#
计算某字符出现次数
https://www.nowcoder.com/practice/a35ce98431874e3a820dbe4b2d0508b1
import sys str1 = input().lower() str2 = input().lower() # print(str1.count(str2)) #方法1 #方法2 num = 0 for word in str1: if word == str2: num = num + 1 print(num)