how to change a global variable from within a function python code example Example: how to declare global variable in python global n n = 'whatever'