Phyton, How to set a scope for the dictionary in Python?

Have a dictionary in Python code , in which 35 keys keys, respectively, are numbers from 1 to 35. Further, according to the code the user is asked to enter a message (a = input( message :)) before this indicating that it must consist of digits only, then following code is the message, i.e. in the string form is translated into a list of list() , and so, the question is how to specify the settings or something for Phyton'a , to transfer from one line in the list he was able to discern that the figure of 2 is, for example, 11, 14, 17. I never figured out how to fix it, if you run the code everything works but the only problem is that it is the translation of each digit separately and takes in the list of work numbers 1 to 9, although some of them meant 19 , not 1 and 9. Help , please, if the question is actually correct and makes sense, any idea what it's for Python, we need a neural network?
June 27th 19 at 15:16
1 answer
June 27th 19 at 15:18
if > 9
letters = {1:"a",2:"b",3:"b",4: g,5: d,6: e 7: e 8: W,9:"z",10:"we",11:"hh"}
letter = input("Input a message : ")
uncode = []

letter = list(letter)
print (letter)

for let in letter:
l = int(let)
if l in letters:
uncode.append(letters[l])

print (str(uncode))

So it looks around the part of code, if you enter for example 1255411 - the last two units , I meant 11 instead of 1 and 1, but it's still zaplatit them one by one when will translate into the list, I meant, sorry if incorrect initially asked the question - nikita.Stracke commented on June 27th 19 at 15:21
use a separator
1,2,3,11,22
'1,2,3,11,22'.split(',') - Kameron_Hilpert34 commented on June 27th 19 at 15:24
: Thank you very much! - nikita.Stracke commented on June 27th 19 at 15:27
: not at all - Kameron_Hilpert34 commented on June 27th 19 at 15:30

Find more questions by tags Python