exception for divide by zero code example
Example: divide by zero error python exception handling
try:
print 1/0
except ZeroDivisionError:
print "You can't divide by zero!"
try:
print 1/0
except ZeroDivisionError:
print "You can't divide by zero!"