Defining and Calling Functions, Parameters, Return Values in Python
That’s what a function is in Python. It’s a reusable piece of code that does something specific. You give it some data (we call these ‘parameters’), and it gives you back a result (the ‘return value’).