Skip to content

Python Print Statement

Syntax

The print() function in Python is used to display output to the console.

# Print a simple string
print("Hello, World!")
# Print multiple items separated by spaces
print("Hello,", "World!")
# Use formatted strings
print(f"The result is {42 + 1}")