12.03
Completed
Python Functions: Returning Values Python Functions: Returning Values

Learn how Python functions return values, how to reuse those results, and why return ends the current function call.

Python Functions: Returning Values

Sounds useful?

Jump into the interactive version.

No setup. No account. Just Python.

Interactive Python lesson

Returning Values from Python Functions

Functions become much more useful when they can send results back to the code that called them. This Block introduces return through clear examples with calculations, text, booleans, and lists. You will trace where a returned value goes, store it in a variable, and use function calls inside larger expressions.

What you will learn:

  • Use return to send a value back to the caller
  • Store returned values in variables and reuse them later
  • Place function calls inside calculations, f-strings, and other expressions
  • Return numbers, strings, booleans, and lists
  • Understand that return ends the current function call
  • Use conditional returns and keep calculations before the return statement

By the end, you will be able to write small functions that calculate a result and hand it back exactly where your program needs it.

> Start now 123 cards · about 9 min

Ready to practice this in the browser?

> Play now