Python Variable Scope In Function Excel