How to create a variable in python and extras

Shourya kelkar
1 min readApr 26, 2021

--

In this article, you will be learning how to make a variable and how to use it in different ways. You will also be learning how to use the print function with the variables also.

How do we create a variable in python?

To do this we write the name of the variable with no indentation, then we add a have space and then add an equal sign and then another space, and then you write your value of the variable.

X= name of the variable

How do we link variables to input or print functions?

For the input function, all you have to do is that instead of the integer or string type the input function. This means that the answer of the input will be equal to the variable as a string. the way is shown below

X= name of the variable

To do use the print function all you need to do is as follows. instead of adding the string put the name of the variable and should print out the variable's answer. shown below how to.

--

--

Shourya kelkar

I am a python programmer. I will try and help you as much as possible if you are new to python programming. I am 14 years old