Mobile Numeric Keypad Problem In Python