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

6 lines
233 B
Python

try:
temp = 0/0
# 'except' catches any errors that may have been raised between the code of 'try' and 'except'
except: # Note: catch all handler ... NOT RECOMMENDED
print "An error occurred."
# Output : "An error occurred"