天天看點

python統計字母在字元串中出現的次數

代碼

str = input().upper()
alpha = input().upper()
print(str.count(alpha))      

執行效果