4 for 'h', 4 for 'i', 4 for 'j', 5 for 'k', 5 for 'l', 5 for 'm', 6 for 'n', 6 for 'o', 6 for 'p', 7 for 'q', 7 for 'r', 7 for 'r', 7 for 's', 7 for 't', 8 for 't', 8 for 'u', 8 for 'v', 9 for 'w', 9 for 'x', 9 for 'y' and 9 for 'z'. for every c in phone converted to lowercase, join the value under the c key of the char2number dictionary into a string, return it.
return '' . join ( char2number . get ( c , c ) for c in phone . lower ( ) )