classSolution:defshortestCompletingWord(self, licensePlate:str, words: List[str])->str:
s =[w for w in licensePlate.lower()iford(w)>=97andord(w)<=122]
words.sort(key=lambda x:len(x))#按單詞長度進行排序for w in words:
w_copy=list(w)for i in s:#判斷單詞是否包含牌照所有字母if i in w_copy:
w_copy.remove(i)else:#不滿足條件breakelse:return w #返回滿足條件的單詞