Python Global and Local Variables

Опубликовано: 03 Ноябрь 2020
на канале: Painless Programming
85
4

Python Global and Local Variables.
python uses pass by object reference, which can be difficult to understand at first.
In my simple example you pass a variable to the function, but when the function makes a change to it, it is only changing a local variable and the global variable remains unchanged.

Adding the keyword global allows the function to make changes to a global variable.


На этой странице сайта вы можете посмотреть видео онлайн Python Global and Local Variables длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Painless Programming 03 Ноябрь 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 85 раз и оно понравилось 4 зрителям. Приятного просмотра!