a = input("請輸入字符串:")
b = list(a.lower()) #將輸入的字符全部轉換為小寫字母
c = {} #建立壹個空字典
for i in b: #for循環遍歷出結果
c[i] = b.count(i)
print(c)
輸出結果: