Demonstrate Exception in Python
Before seeing the method to solve it, let’s write a program to raise an error.
Python3
def divide(a, b): return a / b print (divide( 4 , 0 )) |
Output:
How to Ignore an Exception and Proceed in Python
There are a lot of times when in order to prototype fast, we need to ignore a few exceptions to get to the final result and then fix them later. In this article, we will see how we can ignore an exception in Python and proceed.