Given a series of keypresses on your phone, can you write a piece of code that brings up all the possible words that would have had these numbers if they were written with T9 (e.g., 2 is abc, 3 is def, 4 is ghi)?
Implement def letter_combinations(digits):. The input is a string containing digits from 2 through 9; return a list of all possible letter strings in T9 mapping order. Return an empty list for an empty input.
def letter_combinations(digits):