Exception Handling In Python || Exception Handling || Python
In this we are going to see a basic program to perform exception handling using else in Python Programming Language.



try:
    a = [1, 2, 3]
    b = a[2]
    print(b)
except IndexError:
    print("Index out of range")
else:
    print("No exception")

# Coded By Dhiraj Shelke


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post