How do you properly ignore Exceptions in Python?
Answers
Answered by
0
How do you properly ignore Exceptions in Python?
PythonServer Side ProgrammingProgramming
I have a try-except block in following code and I just want to continue with the code by ignoring the exception block.
try:
x,y =7,0
z = x/y
except:
#do nothing
The problem is if I leave the ‘except’ block empty or with a #do nothing, it gives an error as follows
File "C:/Users/~foo.py, line 7
IndentationError: expected an indented
Similar questions
Computer Science,
8 months ago
Social Sciences,
8 months ago
English,
8 months ago
English,
1 year ago
English,
1 year ago