On this page
  1. print
  2. Import & Availability
  3. Overview & Signature
  4. Usage
  5. Gotchas
  6. REPL Inspect

print

Prev: pow | Up: __builtins__ | Next: property
Rel: breakpoint, compile, eval, exec, globals
Ref: docs.python.org — print
Tags: #public #python3 #builtins


Import & Availability

# Built-in (available globally without import)
from builtins import print

Overview & Signature

print(*args, sep=' ', end='\n', file=None, flush=False)

Prints the values to a stream, or to sys.stdout by default.

Usage

import io

buf = io.StringIO()
print("a", "b", "c", sep="-", end="!", file=buf)
assert buf.getvalue() == "a-b-c!"

Gotchas

REPL Inspect

help(print)

Linked from

Related notes