AI engineering glossary · Python core
What is return value?
Return value: The result a function sends back to its caller with the return statement, which also ends the function immediately. A function with no return statement returns None. It can return several values as a tuple.
Return value: an example
def stats(nums): return min(nums), max(nums) gives (2, 9) for [2, 5, 9], which can be unpacked as lo, hi.
Related terms
More Python core terms
Where you learn it
Return value is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.