local and global variables in python

Опубликовано: 08 Сентябрь 2019
на канале: Everything About Computers
108
5

In this tutorial we will learn about local and global variables when working with functions.
In Python, variables that are only referenced inside a function are implicitly global. If a variable is assigned a value anywhere within the function’s body, it’s assumed to be a local unless explicitly declared as global.

local and global variables comes into picture when one starts working with functions.
Any variable used within the function will be local to that function. It's life will be to the point the function is active. Any variable in the main program will be considered as global.


Смотрите видео local and global variables in python онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Everything About Computers 08 Сентябрь 2019. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 108 раз и оно понравилось 5 посетителям.