python中雙引號和字母誰大?
str_1=input("請輸入一個字符串:") lower=0 upper=0 for i in str_1: if i.islower(): lower += 1 elif i.isupper(): upper += 1 print("有%s個大寫字母"%upper) print("有%s個小寫字母"%lower)
上一篇數據采編有沒有前景呢
python中雙引號和字母誰大?
str_1=input("請輸入一個字符串:") lower=0 upper=0 for i in str_1: if i.islower(): lower += 1 elif i.isupper(): upper += 1 print("有%s個大寫字母"%upper) print("有%s個小寫字母"%lower)