Python Update A Global Variable In A Function