python access global variable from inside function code example Example: how to make variable global in python global variable variable = 'whatever'