Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- two = ["A", "B", "C"]
- three = ["D", "E", "F"]
- four = ["G", "H", "I"]
- five = ["J", "K", "L"]
- six = ["M", "N", "O"]
- seven = ["P", "Q", "R", "S"]
- eight = ["T", "U", "V"]
- nine = ["W", "X", "Y", "Z"]
- other = ["1", "0", "-"]
- symbols =[two, three, four, five, six, seven, eight, nine]
- number = input()
- counter = 0
- for byte in number:
- byte = number[counter].upper()
- if byte in two:
- print("2", end="")
- elif byte in three:
- print("3", end="")
- elif byte in four:
- print("4", end="")
- elif byte in five:
- print("5", end="")
- elif byte in six:
- print("6", end="")
- elif byte in seven:
- print("7", end="")
- elif byte in eight:
- print("8", end="")
- elif byte in nine:
- print("9", end="")
- else:
- print(byte,end="")
- counter += 1
- if counter > 29:
- break
- print("\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement