output' is not defined python