Printing to the Screen in Python


The simplest way to produce output is using the print statement where you can pass zero or more expressions separated by commas. This function converts the expressions you pass into a string and writes the result to standard output as follows −

Example

 Live Demo

#!/usr/bin/python
print "Python is really a great language,", "isn't it?"

Output

This produces the following result on your standard screen −

Python is really a great language, isn't it?

Updated on: 30-Jan-2020

349 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements