but not xmeans that the assignment to inside the nested function changes in the enclosing function' local scope without this statementthis assignment would classify as local to the nested functionmaking it different variablethe code would then print 'niinstead although the values of local variables go away when function returnsyou can make python function retain state information by using shared global variablesenclosing function scope references within nested functionsor using default argument values function attributes can sometimes allow state to be attached to the function itselfinstead of looked up in scopes another alternativeusing classes and oopsometimes supports state retention better than any of the scope-based techniques because it makes it explicit with attribute assignmentswe'll explore this option in part vi test your knowledgeanswers