loop loop loop loop continuing if you change the raise in this to breakyou'll get an infinite loopbecause you'll break only out of the most deeply nested for loopand wind up in the second-level loop nesting the code would then print "loop and start the for again also notice that variable is still what it was after the try statement exits variable assignments made in try are not undone in generalthough as we've seenexception instance variables listed in except clause headers are localized to that clauseand the local variables of any functions that are exited as result of raise are discarded technicallyactive functionslocal variables are popped off the call stack and the objects they reference may be garbage-collected as resultbut this is an automatic step exceptions aren' always errors in pythonall errors are exceptionsbut not all exceptions are errors for instancewe saw in that file object read methods return an empty string at the end of file in contrastthe built-in input function--which we first met in deployed in an interactive loop in and learned is named raw_input in --reads line of text from the standard input streamsys stdinat each call and raises the builtin eoferror at end-of-file unlike file methodsthis function does not return an empty string--an empty string from input means an empty line despite its namethoughthe eoferror exception is just signal in this contextnot an error because of this behaviorunless the end-offile should terminate scriptinput often appears wrapped in try handler and nested in loopas in the following codewhile truetryline input(read line from stdin (raw_input in xexcept eoferrorbreak exit loop at end-of-file elseprocess next line here several other built-in exceptions are similarly signalsnot errors--for examplecalling sys exit(and pressing ctrl- on your keyboard raise systemexit and keyboardinter ruptrespectively python also has set of built-in exceptions that represent warnings rather than errorssome of these are used to signal use of deprecated (phased outlanguage features see the standard library manual' description of built-in exceptions for more information designing with exceptions