def __str__(self)return 'so became waiter raise career(traceback (most recent call last)file ""line in __main__ careerso became waiter termination actions finallytry statements can say "finally"--that isthey may include finally blocks these look like except handlers for exceptionsbut the try/finally combination specifies termination actions that always execute "on the way out,regardless of whether an exception occurs in the try block or nottryfetcher( finallyprint('after fetch''mafter fetch termination actions hereif the try block finishes without an exceptionthe finally block will runand the program will resume after the entire try in this casethis statement seems bit silly --we might as well have simply typed the print right after call to the functionand skipped the try altogetherfetcher( print('after fetch'there is problem with coding this waythoughif the function call raises an exceptionthe print will never be reached the try/finally combination avoids this pitfall--when an exception does occur in try blockfinally blocks are executed while the program is being unwounddef after()tryfetcher( finallyprint('after fetch'print('after try?'after(after fetch traceback (most recent call last)file ""line in file ""line in after file ""line in fetcher indexerrorstring index out of range exceptionsthe short story