Return Values
Discover how to use return values to make functions more versatile.
1
Introduction to Return Values
Return values allow functions to send data back to the part of the program that called them. This makes functions more versatile and reusable.
In this lesson, you will learn how to use return values effectively in Python functions.

2
What is a Return Value?
A return value is the output of a function. You can use the return keyword to send data back to the caller.
For example:
# Function with a return value
def add(a, b):
return a + b
result = add(3, 5)
print(result)