Using Global Variables in Python Functions

Publicado el: 02 May 2024
en el 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


En esta página del sitio puede ver el video en línea Using Global Variables in Python Functions de Duración hora minuto segunda en buena calidad , que subió el usuario Real Python 02 May 2024, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 1,438 veces y le gustó 65 a los espectadores. Disfruta viendo!