6.13 Summary
Functions allow you to save sequences of Python expressions and statements and reuse them. You can parameterize a function, which means that its behavior might change based on the arguments you give it.
There is rarely only one way to accomplish a task, and we saw that the choice of algorithm could strongly influence a function’s execution time. Python is well-tuned for iterative operations, and you should use recursion carefully.
All our functions have taken arguments and returned objects that were built into Python by its developers. They have operated on numbers, strings, tuples, lists, sets, and dictionaries. In the next chapter, I introduce classes and the objects we construct with them. A function we define within a class goes by a new name: method.