Catching Two Exceptions with One Block : Try : Statement PYTHON TUTORIALS


PYTHON TUTORIALS » Statement » Try »

 

Catching Two Exceptions with One Block


try:
   x = input('Enter the first number: ')
   y = input('Enter the second number: ')
   print x/y 
except (ZeroDivisionError, TypeError):
   print 'Your numbers were bogus...'



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo Statement
» Try