Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Print Single and Multiple variable in Python

  • Difficulty Level : Basic
  • Last Updated : 12 Jun, 2021

In Python 3.X, the print statement is written as print() function. Below code in Python 3.X that shows the process of printing values in Python.

Example 1: Printing Single value

 Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.  

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course


# Equivalent codes in Python 3.0
# (Produces same output)
# Code 1:
# Code 2 :



Example 2: Printing multiple values 


# Code 1:
print(1, 2)
# Code 2:
print((1, 2))
# Code 3:
# printing on the same line
# for printing on the same line use end parameters of the print function
# end takes the values which is printing at the end of the output.
print(1, end=" ")


1 2
(1, 2)

This article is contributed by Arpit Agarwal. If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!