Python Variables

What is a Variable in Python?

Change Python is the memory center for storage. In other words, program changes, and Python provides computer information.
Each Python value has a type of data. Different types of Python data type, list, thieves, strings, languages, etc. Changes can be mentioned in any name or even by the  ABC, etc.

Variable Types in Python:

In many languages, the variables are written normally. This means that the variable is said to be specific to the type of data, and the different value assigned to it during its lifetime and its kind and nature.
The items in Python are not limited. In Prayer, the variable is named value for one type and then remaps the value of different types:

Variable Names

Examples have seen the names so far used short, variables like m and n. But the name of the price may be more detailed. In fact, it is usually beneficial, since it requires that more need to be tested first.
Formally, the variable name can be any length that contains a large number of uppercase and lowercase letters (A-Z, a-z), number (0-9), and underline (_). A further limit is that, although the variable name may contain a number, the first name of a variable variable is not.

Enroll Now: Python Training in Chennai

List of Some different Variable Types

x = 123                                      # integer

x = 123L                                   # long integer

x = 3.14                                     # double float

x = "hello"                                 # string

x = [0,1,2]                                 # list

x = (0,1,2)                                 # tuple

x = open(‘’, ‘r’)             # file

You can also assign a single value to several variables simultaneously multiple assignments.

Variable a,b and c are assigned to the same memory location,with the value of 1 a = b = c = 1

Local And Global Variable:

Python when you want to use the same variable in the other program or module you tell the global variable, while if you want to use a variable for the function or method, use a local variable.
I will understand the difference between local and global variables in the program.
1. Changed “f” is the whole world and is allocated to a value of 101, which is published in production
2. It was proclaimed again and he thinks it is the local boundary. It is valued at the price “I learned Python.” It has been published as a product. This difference varies from international change to “F” to determine what has happened
3. At the end of the call, the environmental change has been destroyed. On line 12, when we return “f” indicating the value of the change of f = 101

Enroll Now: Python Training in Bangalore


White spaces and signs with special meanings in Python, as “+” and “-” are not allowed.

I usually use lowercase with words separated by underscores as necessary to improve readability.

Remember that variable names are case sensitive.


This session covered the basic Python trends, including the reference material and identity, and the name of the Python identity.
They now have a good understanding of the different types of data being applied and how to create a variable that shows the type of substances they are.
Next, you will see how to combine the data that shows a variety of reactions.

To getting expect level training for Python training in your Location – Python Training in Chennai | Python Training in Bangalore | Python Training in Pune | Python Training institute in Chennai Python Interview Questions | Python Course in Chennai

Leave a Reply

Your email address will not be published. Required fields are marked *