• Save
  • Run All Cells
  • Clear All Output
  • Runtime
  • Download
  • Difficulty Rating

Loading Runtime

What is the print() function in Python?

The print() function in Python is used to output text, variables, or expressions to the console or standard output device (like the output section of a code cell in a notebook). It is a built-in function, which means it is available in all versions of Python and doesn't require any special installation or import statements.

Here is an example of using the print() function to output a simple message:

Hello, World!