How to print variables python

Geomario
1 min readOct 23, 2020

Variables are the names that you assign to data. To print variables python values that you assigned, you must use print(). Lets code!

How to print variables Python?
#Code Block 1.0x = 1           #(1)
y = 3.0 #(2)
z = "Ramirez" #(3)

In the code block 1.0, we have created a variables “x” with an integer value 1 (1). The variable “y” has the float value 3.0 (2), and lastly, the value “z” has the string value “Ramirez” (3).

#Code Block 2.0 print (x)     #(1)
print (y) #(2)
print (z) #(3)
>>> 1
3.0
Ramirez

In the code block 2.0, we printed the value variables from the code block 1.0 (1, 2, 3). Variables are fundamental in Python. When creating a Variable, you can use it throughout the entire code. Additionally, you can apply methods and operations with them. We can talk about it in later posts.

Do follow us and give us a clap, bitte! 👏👏👏

Give it a try to the video Variables, full of detailed explanation about variable declaration and methods.

Thank you & Happy coding!

--

--

Geomario

👨‍💻 Software & Data Developer | Software Research Engineer | MLE