Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You need to properly handle the error.
In general, this is done using the try except finally construct.
For example:
try:
result = 1 / 0
except ZeroDivisionError as error:
print(f'Ошибка "{error}" - на ноль делить нельзя!')
try:
# код в котором появляется ошибка
except ошибка_которую_выдает:
pass
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question