class Solution:

def letterCombinations(self, digits):

"""

:type digits: str

:rtype: List[str]

"""

if digits == "" or len(digits) <= 0:

return []

digits_dict = {"2":"abc","3":"def","4":"ghi","5":"jkl","6":"mno","7":"pqrs","8":"tuv","9":"wxyz"}

ret = ['']

for dig in digits:

letters = digits_dict[dig]

ret = [prefix+letter for prefix in ret for letter in letters]

print(ret)

return ret