RUVIDEO
Поделитесь видео 🙏

Python 3 Tutorial: Global Variables and The Global Statement

Be sure to like, share and comment to show your support for our tutorials.

=======================================
Channel - https://goo.gl/pnKLqE
Playlist For This Tutorial - https://goo.gl/EyZFti
Latest Video - https://goo.gl/atWRkF
Facebook - https://www.facebook.com/mastercodeonline/
Twitter - https://twitter.com/mastercodeonlin?lang=en
Website - http://mastercode.online
======================================
Global Variables and The Global Statement In Python

In this Python tutorial, we will talk about global variables and the Global Statement in Python. We saw in the previous tutorial that local variables live within the function and global variables where variables that lived outside a function. We also mentioned that local variables could not be called outside a function and vertically did not exist outside of function.

Before we even go any farther I am going to preach to you for a second. I hate global variables and I will tell you why. Global variables to me are the like the problem child. They are all fine and they are good to you until you have a crappy day and they come along and screw with you.

As you know from the previous tutorial global variables are available inside and outside functions. This is mostly True, we can not change a global value inside a function without our little friend "global statement". More on Mr. global statement shortly. When working with global variables they tend to come back and bite you larger programs because you may forget you already used a name to name global when you are trying to use the name somewhere else. This may or may not interfere with you program but down the road it may get a bit confusing.

I try to put everything into a function sure there may be a time when that is not possible but trust me I will try to get that variable into a function.

I think of functions as minnie programs and I do not like the outerworld messing with my minnie functions and this is why I try my hardest to use only local variables where I can.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Python 3 Tutorial: Global Variables and The Global Statement», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.