A tour of the module `itertools`
- Track:
- Python Core, Internals, Extensions
- Type:
- Talk (long session)
- Level:
- beginner
- Room:
- South Hall 2B
- Start:
- 10:30 on Thursday, 17 July 2025
- End:
- 11:15 on Thursday, 17 July 2025
- Duration:
- 45 minutes
Abstract
This talk walks you through the 20 tools available in itertools, a module you should be proficient in if you aspire to write Python code that makes efficient use iterables.
The talk proposes splitting the module itertools in 5 categories of iterables: combinatorial, reshaping, infinite, filtering, and complementary.
For each category, we will explore the tools available, look at examples of usage, and understand when each iterable can be useful.
Oh, and there’s also tee. Let us not forget tee!