Using Global Variables in Python Functions

Publicado em: 02 May 2024
no canal de: Real Python
1,438
65

This is a preview of the video course, "Working With Global Variables in Python Functions." A global variable is a variable that you can use from any part of a program, including within functions. Using global variables inside your Python functions can be tricky. You’ll need to differentiate between accessing and changing the values of the target global variable if you want your code to work correctly.

This is a portion of the complete course, which you can find here:
https://realpython.com/courses/global...

The rest of the course covers:
Access, create, and modify global variables within your functions with the globals() function
Understanding mutability
Deciding when to use globals
Explore strategies to avoid using global variables in Python code


Nesta página do site você pode assistir ao vídeo on-line Using Global Variables in Python Functions duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Real Python 02 May 2024, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 1,438 vezes e gostou 65 espectadores. Boa visualização!