try: raise KeyboardInterruptfinally: print 'Goodbye, world!' # A finally clause is executed whether or not an exception has occurred in the try # clause.