题解 | #计算某字符出现次数#
计算某字符出现次数
https://www.nowcoder.com/practice/a35ce98431874e3a820dbe4b2d0508b1
str1 = input().upper()#输入字符,并转换成大写
str1 = input().upper()输入字符,并转换成大写
sum = 0
for i in str1:#遍历字符
if i == str2:#条件判断,满足的话就sum=sum+1
sum+=1
print(sum)
#华为笔试##华为社招OD面经#