12.04
Completed
Python Functions: Return, Print & None Python Functions: Return, Print & None

Learn when functions should return values, when they should print output, and why unexpected None values appear.

Python Functions: Return, Print & None

Sounds useful?

Jump into the interactive version.

No setup. No account. Just Python.

Interactive Python lesson

Return, Print, and None in Python

A function can display a value, return it to the caller, or quietly produce None. These behaviors can look similar at first, but they lead to very different programs. This Block uses small, practical examples to show when to use print(), when to use return, and how to spot the missing return paths that create unexpected None values.

What you will learn:

  • Use print() to display output for a person
  • Use return to give reusable values back to the caller
  • Store, compare, print, and calculate with returned values
  • Understand why functions without an explicit return produce None
  • Recognize that print() also returns None
  • Find conditional paths that accidentally skip every useful return

Leave with a simple mental model for choosing between displaying a value and returning it, plus a practical checklist for debugging unexpected None values.

> Start now 76 cards · about 7 min

Ready to practice this in the browser?

> Play now