A variable is a name and a way of referring the memory location of a value used by a computer program.
This means that when you create a variable you reserve some space in memeory. Based on the data type of a variable, the interpreter allocates memory and decides what can be stored in the reserved memory.
A variable is a symbolic name for this physical location. This memory location contains values, like numbers, text or more complicated types.
We do not need to declare variables before using them, or declare their type. A variable is created the moment we first assign a value to it.
A variable is a good way to store information while making it easy to refer to that information in our code later.
underscore ( _ )
.case sensitive
for example hello world, and HelloWorld are not the same.10 15 20
10 10 10
Prayag Verma aimtocode
Global variable in Python is a variable that can be used globally anywhere in the program. It can be used in any function ormodule, and even outside the functions, without having to re-declare it.
Welcome to Python
A variable that is declared inside a python function or a module can only be used in that specific function or Python Module.
The global variable with the same name will remain as it was, global and with the original value.
I am Local variable I am Global Variable