17. 电话号码的字母组合(两星推荐)
Python解答(由于python已经不再更新2.x, 以后提到python默认都是python3) 思路1:Python有一个默认的包 `itertools.product()` 可以解决这个问题 class Solution: def letterCombinations(self, digits: str) -> List[str]: if(digits==""): return [] import itertools num2alpa = dict({'2': ['a','b','c'],
下载地址
用户评论