Python Variable Scope In Function Create