Core Python: Types of Variables in Python

preview_player
Показать описание
Variables are names that given to data that we need to store and manipulate. Python is not ” statically type” i.e. no need to declare variables or their data types before using them. Python is completely object oriented. Every variable in Python is an object.A variables is created the moment we first assign a value to it.Python variables do not need explicit declaration to reserve memory space. The declaration happens automatically when you assign a value to a variable. The equal sign (=) is used to assign values to variables.The operand to the left of the = operator is the name of the variable and the operand to the right of the = operator is the value stored in the variable.
Rules for creating variables is as same as in other high level language
-A variable name can contain small case letters (a-z), upper case letters (A-Z), numbers (0-9), and underscore (_).
-A variable name can’t start with a number.
-We can’t use reserved keywords as a variable name.
-A variable can’t contain only digits.
-A python variable name can start with an underscore or a letter.
-The variable names are case sensitive.
-There is no limit on the length of the variable name.

Also check our blog on variables by clicking the following link
Рекомендации по теме
visit shbcf.ru