Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def decode(word):
- dictionary = [
- [" "], #0
- ["a","b","c"], #2
- ["d","e","f"], #3
- ["g","h","i"], #4
- ["j","k","l"], #5
- ["m","n","o"], #6
- ["p","q","r","s"], #7
- ["t","u","v"], #8
- ["w","x","y","z"], #9
- ]
- sample = word
- sample = sample.split(" ")
- for i in sample:
- try:
- if int(i[0]) == 0:
- print(dictionary[i])
- else:
- num = len(i)-1
- firstChar = int(i[0])-1
- print (dictionary[firstChar][num],end="")
- except:
- print("[not found]",end=" ")
- print()
- #decode(input())
- #┌─[nightsec@greyxploiter]─[~/Documents/coding/test/go/lath_module]
- #└──╼ $python hp_jadul.py
- #2 22 222 3 33 333 4 44 444 5 55 555 6 66 666 7 77 777 7777 8 88 888 9 99 999 9999
- #abcdefghijklmnopqrstuvwxyz
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement