Python Persistent Variable In Function