Multiple except Clauses : Try : Statement PYTHON TUTORIALS


PYTHON TUTORIALS » Statement » Try »

 

Multiple except Clauses


try:
   v = intraw_input("Enter a value: "))
   print "We got some valid input!"
   x = 100 / v
except ValueError:
   print "Invalid input, please enter a value"
except KeyboardInterrupt:
   print "Please don't hit ctrl-c"



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo Statement
» Try