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