#Python TQC考題706 全字母句
k=eval(input())
for i in range(k):
s=input()
chars=set(s.lower())
#set沒有重複值
chars.remove(” “)
print(len(chars)==26)

#做第二次:

#str1.replace(” “,””) 把空白取代為什麼都沒有
#不能用.strip(),只會去除左右兩邊的空白
#中間的空白無法用.strip()去除
#重點是記得用set()做

“””
這次做複雜了
set(str)就可以將字串拆分為各字母
不用透過list()中介
“””

“””
做回原本簡單的作法
list使用.remove(” “) 移除空白
str使用.replace(” “,”” )
將空白取代為什麼都沒有
且要用strNew承接replace後的字串
“””

“””
雖然簡單,還是會小漏
例如:忘記使用strNew
承接.replace()後的字串
最後一行的len()也會遺漏
“””




![Python: 如何求整個 pandas.DataFrame 中的最大值? pandas.DataFrame .max().max() ; 如何求最大值的index, columns? numpy.where(condition, [x, y, ]/) ; condition為一 bool_mask Python: 如何求整個 pandas.DataFrame 中的最大值? pandas.DataFrame .max().max() ; 如何求最大值的index, columns? numpy.where(condition, [x, y, ]/) ; condition為一 bool_mask](https://i1.wp.com/savingking.com.tw/wp-content/uploads/2023/04/20230418154049_50.png?quality=90&zoom=2&ssl=1&resize=350%2C233)
![Python TQC考題604 眾數, cnt[L.index(n)]+=1, L[cnt.index(max(cnt))], if L.count(n)>maxcnt: Python TQC考題604 眾數, cnt[L.index(n)]+=1, L[cnt.index(max(cnt))], if L.count(n)>maxcnt:](https://i2.wp.com/savingking.com.tw/wp-content/uploads/2022/04/20220430181911_73.png?quality=90&zoom=2&ssl=1&resize=350%2C233)






近期留言