declaration of global and local variables with reference of python program in python

Опубликовано: 06 Октябрь 2024
на канале: programmer aditya
146
6

Variables that are created outside of a function are known as global variables.
global variables are used by everyone , both inside of function and
outside.
variable that are created inside a function are known as local variables.

To create a global variable inside a function, you can use the global keyword.