Python variables

Python is a programming language used for multiple areas like Web design , Machine learning , Data science , Software development , Web and Desktop application designing .Here we learn about python variables . We using python 3.7.4 and Pycharm . Pycharm is a IDE (Integrated Development Environment) helps to run python program and provide beautiful interface and some extra things .

What is Variable?

Variable is store to information using by programmers. Variables are names used to refer to some memory locations of computer .

Here we learn about python variables and how to define variables in python with some examples .

In python you don’t need to define a type of variable . Variables is assigned with equal sign .

Take a example

Here var1 , var2 and var3 are three variables store string ,int and float value but in python we don’t use any data type . Output of the following code is :

Lets take a another example for better understanding of variables and some fundamentals of python.

Here we using three variables var1 , var2 and var3 . var1 and var2 have string value and var3 have float value . Print statement using for adding var1 and var2.

Lets take another example

Here var1 and var2 are two variables . Interface taking as string . The output is :

Lets take a exmaple where we learn different thing :

Here var1 and var2 are two variables . we are taking this variable as int. If we want this variable taken as a string and as a float then we can do with the help of str and float function.

Lets take a interesting thing in python how to print 10 time a particular string :

n is use for next line .

If anyone wants cyber security training and certification or any cyber security internship then you contact us. We provide placement as well as every type of developing and security related services.

If my blog is interesting as well as knowledgeable for you then guys waiting for my next blog . I will cover full python basic to advance .

Table of Contents

Social Media