# It is possible to write programs that handle selected exceptions. Look at the following example, which prints a table of inverses of some floating point numbers:
numbers = [0.3333, 2.5, 0, 10] for x in numbers: print x, try: print 1.0 / x except ZeroDivisionError: print '*** has no inverse ***'
Related Scripts with Example Source Code in same category :