Revathi Kasireddy
last year
Revathicountry asked

In Python, is print a variable or something else?

Abhay Jajodia
Expert
last year
Abhay Jajodia answered

Hi Revathi Kasireddy,

print is not a variable. It is a built-in function that shows output on the screen.

A variable is something like greeting that stores a value:

greeting = "Merry Christmas"
print(greeting)   # prints the value inside greeting

So print() displays a value, and the variable is what holds the value.

If you have more questions, I am here to help 😊

Python
This question was asked as part of the Getting started with Python course.