how to make a variable global only in function in python code example Example: how to make variable global in python global variable variable = 'whatever'