Explain Return Statement in Python
A return statement signals the end of a function’s execution, sending back the result (the value of the expression following the return keyword) to the caller. Anything after the return statement won’t be executed. When a return statement lacks an expression, it returns the special value None. Ultimately, a return statement is how a function is activated, allowing the execution of the provided statements.
Note: Return statements are only used inside functions.
Syntax:
def tmp():
  statement
 return [ expression ]
Here, I've given you an example in which the return statement performs an operation and returns a value.
Example:
# Python program to demonstrate return statement
def add(x, y):
# returning sum of x and y
return x + y
def is_true(x):
# returning boolean of x
return bool(x)
# calling the function
tmp = add(2, 3)
print(f"Result of add function is {tmp}")
tmp = is_true(2<5)
print(f"\nResult of is_true function is {tmp}")
Output:

Here I gave you another example of which you can return multiple values using the object.
Example:
# A Python program to return multiple values from a method using classÂ
class tmp:Â
def __init__(self):Â
self.str = "AccuCloud"
self.val = 20
# This function returns an object of tmpÂ
def func():Â
return tmp()
# creating object of the func()Â
a = func()Â
print(a.str)Â
print(a.val)
Output:

You can also return value using a tuple. A Tuple consists of items separated by commas and can be created both with or without parentheses. Tuples, once created, cannot be changed (they are immutable).
Example:
# A Python program to return multiple values from a method using tupleÂ
def tmp():Â
stri = "Accu Cloud"
a = 20
return str, a;Â # Returning tuple
# Driver code to test above methodÂ
stri, x = tmp()Â
print(stri)Â
print(x)
Output:

Example:
# A Python program to return multiple values from a method using list
def tmp():
stri = "Accu Cloud"
a = 10
return [stri, a];
list1 = tmp()
print(list1)
Output:

You can also return the dictionary. A Dictionary shares similarities with hashes or maps found in other programming languages.
Example:
# A Python program to return multiple values from a method using dictionary
def tmp():Â
a = dict();Â
a['stri'] = "Accu Cloud"
a['z'] = 10
return a
a = tmp()Â
print(a)
Output:

Here I have given you an example of which functions are like objects, so we can send back a function from another function. This works because, in Python, functions are treated as super flexible objects.
Example:
def fun1(a):
def adder(b):
return a + b
return adder
adding = fun1(15)
print("The result is", adding(20))
def tmp(x):
return x * 10
def my_func1():
return tmp
res = my_func1()
print("Result is:", res(20))
Output:

Conclusion:
The return statement in Python helps us send back values from functions to the place they were called. It’s like handing over a package of information before the function finishes its job.