How To Define A Variable In A While Loop Python