How to program for exception handling in python


How to program for exception handling in python.


  1. def ExHndl(a,b):
     c=0
     try:
     c=a/b
     except ZeroDivisionError:
    print("Math Error")
     else:
     print(c)
     finally:

    print("Definetly Run")

OutPut:-



Post a Comment

0 Comments