Python print() Function

Short answer
print(*objects, sep=' ', end='\n') converts each value to text, joins them with sep, writes the result followed by end and returns None.

print() is the first function most people meet in Python. It is how a script shows a result, a message or a value you want to inspect while debugging. You can give it as many values as you like, of any type, and it turns each one into text for you.

Because it only shows things, print() is not a way to hand a value back from a function. For that you need return, which is explained in print vs return. The basics of screen output are also covered in the input and output lesson.

Quick facts
Syntaxprint(*objects, sep=' ', end='\n', file=None, flush=False)
Parametersobjects: zero or more values to show; sep: text placed between values; end: text added at the end; file: where to write (default sys.stdout); flush: force the output out immediately
ReturnsNone
Python versionWorks the same in every Python 3 release; Python 2 used a statement without parentheses

How print() turns values into text

For every value you pass, print() calls str() on it, so numbers, lists, booleans and None all display without any manual conversion. Values are separated by one space unless you change sep, and a newline is added at the end unless you change end.

Python
price = 19.5
print("Price:", price, True, None)
print()
print("done")

Calling print() with no arguments just prints an empty line, which is handy for spacing out a report.

print() parameters: sep, end, file and flush

All four parameters are keyword-only: you must write their names.
ParameterDefaultWhat it changesExample
sep' 'Text placed between the valuesprint(1, 2, 3, sep='-') gives 1-2-3
end'\n'Text written after the last valueprint('Loading', end='...') stays on the same line
filesys.stdoutThe object to write to, such as sys.stderr or an open fileprint('oops', file=sys.stderr)
flushFalsePushes buffered output out straight awayprint('tick', flush=True)

Printing formatted output with f-strings

When a line mixes text and values, an f-string is clearer than passing many comma-separated arguments and lets you control decimals and alignment.

Python
student = "Asha"
score = 87.456
print(f"{student} scored {score:.1f}")

Use print(a, b) for quick checks and f-strings when the exact layout matters.

print() in loops and with unpacking

Putting a * in front of a list passes each item as a separate argument, which together with sep gives a tidy one-line list without brackets. Inside a for loop you can use end to keep several values on one line.

Examples you can run

Press Run, then edit the code and run it again.

Change the separator and the ending

sep goes between values and end replaces the final newline.

Change the separator and the ending
print("2025", "06", "30", sep="-")
print("Loading", end="...")
print("done")
Expected output2025-06-30
Loading...done

Print a shopping cart on one line

Unpacking the list with * prints every item as its own argument.

Print a shopping cart on one line
cart = ["pen", "notebook", "ruler"]
print(cart)
print(*cart, sep=", ")
print("Items:", len(cart))
Expected output['pen', 'notebook', 'ruler']
pen, notebook, ruler
Items: 3

print() returns None

The text appears on screen, but the value the call gives back is None.

print() returns None
result = print("hello")
print(result)
Expected outputhello
None

Common mistakes

Joining text and a number with +

✗ Wrong

age = 30
print("Age: " + age)
TypeError: can only concatenate str (not "int") to str

✓ Right

age = 30
print("Age:", age)
print(f"Age: {age}")

+ cannot join a string and an int. Pass them as separate arguments, convert with str(), or use an f-string.

Writing print without parentheses

✗ Wrong

print "hello"
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

✓ Right

print("hello")

In Python 3 print is a function, so it always needs parentheses.

Expecting print() to give back a value

✗ Wrong

def total(a, b):
    print(a + b)

x = total(2, 3)
print(x + 1)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

✓ Right

def total(a, b):
    return a + b

x = total(2, 3)
print(x + 1)

The function printed the sum but returned None. Use return a + b when the caller needs the value.

Python print() Function: questions people ask

How do I print without a newline in Python?

Pass end='' to print(), for example print('Loading', end=''). The next print call then continues on the same line.

How do I print multiple values on one line in Python?

Give print() several arguments separated by commas, such as print('Total:', 42). They are joined with a space, or with whatever you set in sep.

What does print() return in Python?

print() returns None. Its job is the side effect of writing text, not producing a value you can reuse.

Keep learning

Step-by-step lessons:
Python Input and OutputPython f-Strings

Related:
Python print() vs return: What Is the Difference?Python input() FunctionPython str() FunctionPython String format() Method

More in built-in functions:
Python len() FunctionPython range() FunctionPython type() FunctionPython int() FunctionPython float() FunctionPython str() FunctionPython input() FunctionPython sum() Function See all →