Write a function to compute 1 /0 and use try/except to catch the exceptions.
print "Division by zero!"
except Exception, err:
print 'Caught an exception'
Even if a statement or expression is syntactically correct, it may cause an error when an attempt is made to execute it. Errors detected during execution are called exceptions and are not unconditionally fatal.
try statement may have more than one except clause, to specify handlers for different exceptions. At most one handler will be executed. Handlers only handle exceptions that occur in the corresponding try clause, not in other handlers of the same
try statement. An except clause may name multiple exceptions as a parenthesized tuple.
Division by zero!