Answer the question
In order to leave comments, you need to log in
How to check the input of a message in VK?
There is a console program that checks for valid input:
while True:
try:
n = int(input("Введите число от 1 до 10: "))
if count_map.get(n) == None:
raise Exception()
break
except Exception as e:
print('Введено неправильное значение. Необходимо вводить цифру от 1 до 10')
Answer the question
In order to leave comments, you need to log in
I solved the issue by creating a separate event listener loop.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question