Chapter 6. More Complex Data Types
We'll look at a number of built-in and standard library collection types. These collections offer more features than the simple tuple collection. We'll look at the for and while statements which allow us to process the individual items of a collection.
We'll look at some functions which we can use to work with collections of data; these include the map(), filter(), and functools.reduce() functions. By using these, we don't need to write an explicit for statement to process a collection. We'll also look at more specific kinds of reductions such as max(), min(), len(), and sum().
We'll also look at the break and continue statements; these modify a for or while loop to allow skipping items or exiting before the loop ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access