Python Global and Local Variables

Veröffentlicht am: 03 November 2020
auf dem Kanal: Painless Programming
85
4

Python Global and Local Variables.
python uses pass by object reference, which can be difficult to understand at first.
In my simple example you pass a variable to the function, but when the function makes a change to it, it is only changing a local variable and the global variable remains unchanged.

Adding the keyword global allows the function to make changes to a global variable.


Auf dieser Seite können Sie das Online-Video Python Global and Local Variables mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Painless Programming 03 November 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 85 Mal angesehen und es wurde von 4 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!