How To Use Variable Defined Outside Function In Python