Catching Exceptions
try:
print 1/x
except ZeroDivisionError, message:
print "Can’t divide by zero:"
print message
Previous slide
Next slide
Back to first slide
View graphic version