Python Variable Not Defined Outside Function Python Syntax If Else Statement