Scope in Python | Complete Python Playlist

Publié le: 24 July 2021
sur la chaîne: ML Simplified @ Newton School
3
2

A variable is only available from inside the region it is created. This is called scope.

Local Scope:
A variable created inside a function belongs to the local scope of that function, and can only be used inside that function.

Global Scope:
A variable created in the main body of the Python code is a global variable and belongs to the global scope.
Global variables are available from within any scope, global and local.

Global Keyword:
If you need to create a global variable but are stuck in the local scope, you can use the global keyword.
The global keyword makes the variable global.
------------------------------------------------------------------------------------------------------------------------

Newton school is an online Edtech company providing the highest-rated FULL STACK DEVELOPMENT PROGRAM for professionals, graduates, and women.

NEWTON SCHOOL is your gateway to a high-paying tech career in 6 months with Zero fees till placement, transforming you into a rockstar full-stack developer earning 5-40 Lakh per annum salary. Newton School’s students are already working in more than 150+ top companies of India including Zomato, Unacademy, Deloitte, Nutanix, etc.

To watch more videos on programming, Data Structures, Android Development, Data Science, C++, Java, React, subscribe to our channel.

Do visit Newton school Launchpad through: https://www.newtonschool.co/launchpad

Subscribe | Like | Comment

To know more about us and our courses, please visit: https://www.newtonschool.co/

Follow us on
Facebook:   / newtonschool.co  
Instagram:   / newtonschoolofficial  
Linkedin:   / mycompany  


Sur cette page du site, vous pouvez voir la vidéo en ligne Scope in Python | Complete Python Playlist durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur ML Simplified @ Newton School 24 July 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 3 fois et il a aimé 2 téléspectateurs. Bon visionnage!