RosettaCodeData/Task/Flow-control-structures/Python/flow-control-structures-5.py
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

6 lines
198 B
Python

try:
temp = 0/0
# here, 'except' catches a specific type of error raised within the try block.
except ZeroDivisionError:
print "You've divided by zero!"
# Output : "You've divided by zero!"