try: # some python statementsexcept [ExceptionName]: # some error handlingelse: # some other statementfinally: # do something when all is done.Standard Python Error TypesException StandardError ArithmeticError LookupError AssertionError AttributeError EOFError EnvironmentError FloatingPointError GeneratorExit IOError ImportError IndexError KeyError KeyboardInterrupt MemoryError NameError NotImplementedError OsError OverflowError ReferenceError StopIteration SyntaxError SystemError TypeError UnboundLocalError ValueError WindowsError ZeroDivisionError
Name (required)
email (will not be published) (required)
Website