Python Global and Local Variables

Publicado em: 03 Novembro 2020
no canal de: 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.


Nesta página do site você pode assistir ao vídeo on-line Python Global and Local Variables duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Painless Programming 03 Novembro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 85 vezes e gostou 4 espectadores. Boa visualização!