Telephone digits to letters
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:
Input: "24" Output: ['a', 'g'] ['a', 'h'] ['a', 'i'] ['b', 'g'] ['b', 'h'] ['b', 'i'] ['c', 'g'] ['c', 'h'] ['c', 'i']
Subscribe to premium account to see the solution.Get premium now