Mobile Display Keystrokes
Do you remember the old mobile display keyboards? Do you also remember how inconvenient it was to write on it?
Well, here you have to calculate how much keystrokes you have to do for a specific word.
This is the layout:
Return the amount of keystrokes of input str (! only letters, digits and special characters in lowercase included in layout without whitespaces !)
e.g:
mobileKeyboard("123") => 3 (1+1+1)
mobileKeyboard("abc") => 9 (2+3+4)
mobileKeyboard("codewars") => 26 (4+4+2+3+2+2+4+5)
count =       {chr(n):2+i%3 for i,n in enumerate(range(ord('a'), ord('s')))}
count.update( {chr(n):2+i%3 for i,n in enumerate(range(ord('t'), ord('z')))} )
count.update( {str(n)[-1]:1 for i,n in enumerate(range(1,11))} )
count.update( {'s':5, 'z':5, '*':1, '#':1} )

def mobile_keyboard(s):
    return sum(count[c] for c in s)
count =       {chr(n):2+i%3 for i,n in enumerate(range(ord('a'), ord('s')))}
count.update( {chr(n):2+i%3 for i,n in enumerate(range(ord('t'), ord('z')))} )
count.update( {str(n)[-1]:1 for i,n in enumerate(range(1,11))} )
count.update( {'s':5, 'z':5, '*':1, '#':1} )

def mobile_keyboard(s):
    return sum(count[c] for c in s)