#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.apply 讓DataFrame增加新的一欄 ; df[“mean”] = df.apply( np.mean, axis=1) ; DataFrame.apply(func, axis=0, raw=False, result_type=None, args=(), **kwargs) Python: 如何用 pandas.DataFrame.apply 讓DataFrame增加新的一欄 ; df[“mean”] = df.apply( np.mean, axis=1) ; DataFrame.apply(func, axis=0, raw=False, result_type=None, args=(), **kwargs)](https://i2.wp.com/savingking.com.tw/wp-content/uploads/2023/05/20230519084320_22.png?quality=90&zoom=2&ssl=1&resize=350%2C233)




![Python: 如何用numpy.ndarray的reshape 將3D array轉為2D array,再轉為pandas.DataFrame? arr.reshape( arr.shape[0] * arr.shape[1] , -1) Python: 如何用numpy.ndarray的reshape 將3D array轉為2D array,再轉為pandas.DataFrame? arr.reshape( arr.shape[0] * arr.shape[1] , -1)](https://i0.wp.com/savingking.com.tw/wp-content/uploads/2023/03/20230320082325_85.png?quality=90&zoom=2&ssl=1&resize=350%2C233)



近期留言