Skip to main content
Loading page…
Python Mastery
Chapter 22
Lesson 5 of 5
collections, math, random & more
Contents
Notes
Tutor
Concept
The collections Module
Loading activity…
Previous
1 / 9
Continue
Contents
Notes
Discussion
Tutor
30 min
9 activities
0 of 9 done
In this lesson
1
The collections Module
2
Real-World Counter: Word Frequency Analysis
3
math, random, and statistics
4
Match: collections Types to Use Cases
5
Pitfall: random Is Not Cryptographically Secure
6
Practice: Most Common Characters
7
Practice: Simulate a Dice Game
8
Categorize: Which Module?
9
Pro Tip: Use math.isclose() for Float Comparisons
Objectives
Learner can use Counter, defaultdict, namedtuple, and deque from collections for cleaner, faster code
Learner can use math and statistics for numeric calculations without external libraries
Learner can use random for simulations, sampling, and shuffling
Chapter 22 · The Standard Library Toolkit
Regular Expressions (re)
Dates & Times (datetime)
Logging Like a Pro
Config & Environment Variables
collections, math, random & more
Previous: Config & Environment Variables
Next: JSON, Deeply