q, I already asked a similar question, but again there was a similar problem. I have the following code:
input_text = str(input('Введите ваш текст: ')) list1 = ['3','10','2'] list2 = ['а', 'б', 'в'] vivod = [] for c in input_text: if c in list1: i = list1.index(c) vivod.append(list2[i]) print(' '.join(vivod)) The code asks for the user to enter a number and when he types in, for example, 3 looks for it in the first list and displays this index from the second, but if you enter a two-digit number, for example, 10 in the console will display an error or if it will find the number 1 in the list will display its index in the answer. I need to (using this code as an example) when entering 10, output its index from the second, and not index 1.
P'S
Sorry for the mistakes and not the normally posed question, please do not kick your feet.
for c in input_text? - andreymal Nov.