Python Function Update Global Variable In Python