三句话解题:主要在于大小写的问题。掌握python转大写函数upper()和转小写函数lower()即可轻松解答。这里全转换为大写进行比较。
#For her strength and kind heart.
while True:
try:
a = str(input()).upper()
b = input().upper()
res = 0
for i in a:
if i==b:
res+=1
print(res)
except:
break