通过迭代方法数组赋值的时候需要注意。 class Solution: def letterCombinations(self, digits: str) -> List[str]: if len(digits)==0: return [] hashmap=['','','abc','def','ghi','jkl','mno','pqrs','tuv','wxyz'] alpha=[] for i in digits: alpha.append(hashmap[in...