```
def letterCombinations(self, digits):
if digits == "":
return []
ans = []
mapping = ["0", "1", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"]
ans.append("")
digits = str(digits)
for i in range(len(digits)) :
x = mapping[int(digits[i])]
while len(ans[0]) == i :
t = ans.pop(0)
for s in x :
ans.append(t+s)
return ans
```