import string lower_case = [i.strip() for i in str(string.ascii_lowercase)] upper_case = [i.strip() for i in str(string.ascii_uppercase)] key_board = {1: "1", 2: "abc", 3: "def", 4: "ghi", 5: "jkl", 6: "mno", 7: "pqrs", 8: "tuv", 9: "wxyz", 0: "0"} res = "" while True: ...