Python tutorial for beginners 13. Scopes

Pubblicato il: 17 febbraio 2023
sul canale di: ExplainIT
27
5

In this Python course video discussed the concept of scope in Python, which refers to the region of the code where a variable is defined and can be accessed. You can also learn about the LEGB (Local, Enclosing, Global, Built-in) rule, which specifies the order in which Python searches for a variable in different scopes.
Here are examples that demonstrated how the LEGB rule works in Python, including examples of local scope, enclosing scope, global scope, and built-in scope. Also an example of using the global keyword to modify a global variable inside a function, and an example of using the nonlocal keyword to access and modify a variable in the enclosing scope of a nested function.

NEXT VIDEO TO WATCH:
Will be available - 08.03.2023

TIMESTAMPS:
0:00 - Intro
0:45 - What are scopes in Python?
1:52 - What is local scope in Python
4:25 - What is enclosing scope in Python
6:08 - What is global scope in Python
9:10 - What is the built-in scope in Python
9:53 - Greate global and nonlocal variables inside the Python function


ABOUT MY CHANNEL
In my channel, you can find explainers and tutorials about programming and technology.
The topics are for different skills and levels, from beginners to professionals.
   / @explainit1024  
Don’t forget to subscribe!

CHECK OUT OTHER VIDEOS ABOUT GIT:
   • Learn GIT Basics in an hour!  

CHECK OUT PYTHON TUTORIALS:
   • Python tutorial for beginners 1. How to in...  


In questa pagina del sito puoi guardare il video online Python tutorial for beginners 13. Scopes della durata di ore minuti seconda in buona qualità , che l'utente ha caricato ExplainIT 17 febbraio 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 27 volte e gli è piaciuto 5 spettatori. Buona visione!