July 2023
Beginner to intermediate
448 pages
10h 57m
English
So far in this tutorial, we’ve seen several examples of Python functions, which are one of the most important ideas in Python, and indeed in all of computing. In this chapter, we’ll learn how to define functions of our own (Figure 5.1). We’ll also learn a bit more about iterators (mentioned briefly in Section 3.4.2), both because Python often uses such objects as the return values of built-in functions and because they’re important in their own right.
Figure 5.1: Time to level up.
In case you’re not running the Python shell already, you should activate the virtual environment and start the REPL as usual: ...
Read now
Unlock full access