第5章-5 统计字符出现次数 str1 = input() str2 = input() cnt = 0 for i in str1: if i == str2: cnt += 1 print(cnt)