Telephone digits to letters
Question
Suppose you're given a portion of a phone number. Each digit corresponds to letters (as shown below). Using python, write code to return all possible combinations the given number could represent.
Telephone digits, for reference:
For example:
Input: "24"
Output:
['a', 'g']
['a', 'h']
['a', 'i']
['b', 'g']
['b', 'h']
['b', 'i']
['c', 'g']
['c', 'h']
['c', 'i']