When would you use the print() function in Python?

Experience Level: Junior
Tags: Python

Answer

The print() function prints a value to the screen/standard output.

Use it whenever you need to display a string value on the screen. For example when you need to debug an application and display a value of a variable. Or when you are executing an application and want to display progress to a user, so that it is more visible what the application is doing when it is running.

Python for beginners
Python for beginners

Are you learning Python ? Try our test we designed to help you progress faster.

Test yourself