Access Local Variable Outside Function Python Code