python print() function

Published February 16, 2022

Programming involves printing out the message or the code output to the screen after a calculation or processing has been performed.  In Python, we use the print() function to display a message on the screen. Print() is a Python built-in function that is used to display or output a message onto the screen.

The Syntax
The print() function uses the following simple syntax:

Print(value),

where value includes anything that you would like to display on the screen.


Example

In this example, we're going to display "I Love Python"

x= "I Love Python"
print(x)

Output

I Love Python

 

Download Source code

 

Article Contributed By :
https://www.rrtutors.com/site_assets/profile/assets/img/avataaars.svg

342 Views