Nested try and catch : Try : Language Basics PYTHON examples


PYTHON examples » Language Basics » Try »

 

Nested try and catch


Nested try and catch


try:
    try1/0
    except: 
       print "caught an exception"
except ZeroDivisionError:
    print "caught divide-by-0 attempt"

           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Language Basics
» Try