A function, typically, returns a value. Keyword: "typically". Consider a function like so:

def f(x):
	print(x)

This is a completely valid function that takes in a value x and prints it. Notice how this function does not return anything.

<aside> 💡 Now, for a contradictory fact: all Python functions return a value.

</aside>

How does this work? When we don't return any value, Python does it for us. Let's try this in our interpreter.

>>> def f(x):
>>> ...  print(x)
>>> r_val = f("hi")
hi
>>> r_val
>>>

You'll notice how prompting r_val on the terminal does not return anything — this is because r_val is None.

This, we now know a deep fact about Python — that it implicitly returns None when no other value is returned.

def f(x):
	print(x)
	# return None # implicitly!