filmov
tv
python programming language variable declaration | how to declare variables in Python | Python

Показать описание
# how to declare variables in Python
#variables in python in English
#naming convention for variables in python
In this video, I am going to explain how to declare variables in Python and rules for defining the python variables. How to define naming convention for python variables. This video is use full for python beginners.
Rules for defining a variable in python are:
1. Variable name should contain alphanumeric and underscore (_)
2. Variable name shouldn't start with number.
3. variable should start with a character or underscore(_).
4. Variable names are case sensitive i.e myVar and MYVAR are two different variable.
Variable definition: variables in python are memory location which are used to hold a value.
There are two different types of variables in Python.
1. local variable
2. Global variable.
How to assign variables in python.
using assignment operator (=) , we can assign values to variables in Python.
Example for declaring variables in Python.
a=10
print (a)
here the print statement is used display value of python variable.
In this program we explained How to define rules for Python variables.
#variables in python in English
#naming convention for variables in python
In this video, I am going to explain how to declare variables in Python and rules for defining the python variables. How to define naming convention for python variables. This video is use full for python beginners.
Rules for defining a variable in python are:
1. Variable name should contain alphanumeric and underscore (_)
2. Variable name shouldn't start with number.
3. variable should start with a character or underscore(_).
4. Variable names are case sensitive i.e myVar and MYVAR are two different variable.
Variable definition: variables in python are memory location which are used to hold a value.
There are two different types of variables in Python.
1. local variable
2. Global variable.
How to assign variables in python.
using assignment operator (=) , we can assign values to variables in Python.
Example for declaring variables in Python.
a=10
print (a)
here the print statement is used display value of python variable.
In this program we explained How to define rules for Python variables.