built-in functions and exceptions result is an iterator that produces sequence of tuples in python be aware that using zip(with long input sequences is something that can unintentionally consume large amounts of memory consider using itertools izip(instead built-in exceptions built-in exceptions are contained in the exceptions modulewhich is always loaded prior to the execution of any program exceptions are defined as classes exception base classes the following exceptions serve as base classes for all the other exceptionsbaseexception the root class for all exceptions all built-in exceptions are derived from this class exception the base class for all program-related exceptions that includes all built-in exceptions except for systemexitgeneratorexitand keyboardinterrupt user-defined exceptions should be defined by inheriting from exception arithmeticerror the base class for arithmetic exceptionsincluding overflowerrorzerodivisionerrorand floatingpointerror lookuperror the base class for indexing and key errorsincluding indexerror and keyerror environmenterror the base class for errors that occur outside pythonincluding ioerror and oserror the preceding exceptions are never raised explicitly howeverthey can be used to catch certain classes of errors for instancethe following code would catch any sort of numerical errortrysome operation except arithmeticerror as emath error exception instances when an exception is raisedan instance of an exception class is created this instance is placed in the optional variable supplied to the except statement here' an exampleexcept ioerror as ehandle error 'ehas an instance of ioerror instances of an exception have few standard attributes that can be useful to inspect and/or manipulate in certain applications lib fl ff