Python Declare Variable Outside Loop