题解 | #计算某字符出现次数#
计算某字符出现次数
https://www.nowcoder.com/practice/a35ce98431874e3a820dbe4b2d0508b1
全部转成大写或者小写
while True:
try:
s = input().upper()
c = input().upper()
dp = dict()
for i in s:
if not i in dp:
dp[i] = 1
else:
dp[i] += 1
for k, v in dp.items():
if k == c:
print(v)
break
else:
print(0)
except:
break