Skip to main content
CF

Python 3: Deep Dive (Part 2 - Iteration, Generators)

34h 42m 47s
English
Paid
Updated September 2026

Python 3: Deep Dive (Part 2 - Iteration, Generators) is a 137-lesson 34 hours 42 minutes self-paced course by Udemy. Part 2 of this Python 3 deep-dive series leaves syntax basics behind and goes straight at how iteration actually works under the hood: the sequence and iterable protocols, custom iterators, and the comprehension syntax built on top of…

Course facts

Lessons
137
Duration
34 hours 42 minutes
Level
All levels
Language
English
Updated
2026-09-11
Instructor
Udemy
Price
Premium

Part 2 of this Python 3 deep-dive series leaves syntax basics behind and goes straight at how iteration actually works under the hood: the sequence and iterable protocols, custom iterators, and the comprehension syntax built on top of them.

Core topics

  • Sequences, iterables, and iterators, and how the three protocols relate
  • Generator functions and generator expressions as an alternative to comprehensions
  • The itertools module and its less-obvious but genuinely useful tools
  • Context managers, including writing your own and building them from generator functions
  • Using generators to implement coroutines

Every section ends with a small project so the ideas get used, not just explained. The course sticks to the language and standard library only — no third-party packages — and each module builds on real command of closures, decorators, exception handling, and basic OOP, so it's aimed at developers who already know their way around core Python and want to push into its more advanced mechanics.

137 lessons cover this ground in detail, making it a solid follow-up for anyone who's outgrown beginner Python material.

Who teaches Python 3: Deep Dive (Part 2 - Iteration, Generators)? Udemy

Udemy thumbnail

Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.

Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.

What lessons are included in Python 3: Deep Dive (Part 2 - Iteration, Generators)?

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 137 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Course Overview
All Course Lessons (137)
#Lesson TitleDurationAccess
1
Course Overview Demo
06:31
2
Pre-Requisites
06:05
3
Python Tools Needed
03:04
4
Introduction
01:24
5
Sequence Types - Lecture
17:11
6
Sequence Types - Coding
27:24
7
Mutable Sequence Types - Lecture
07:19
8
Mutable Sequence Types - Coding
18:07
9
Lists vs Tuples
21:51
10
Index Base and Slice Bounds - Rationale
15:15
11
Copying Sequences - Lecture
29:26
12
Copying Sequences - Coding
23:29
13
Slicing - Lecture
32:09
14
Slicing - Coding
14:43
15
Custom Sequences - Part 1 - Lecture
10:41
16
Custom Sequences - Part 1 - Coding
34:01
17
In-Place Concatenation and Repetition - Lecture
05:35
18
In-Place Concatenation and Repetition - Coding
07:28
19
Assignments in Mutable Sequences - Lecture
07:04
20
Assignments in Mutable Sequences - Coding
10:20
21
Custom Sequences - Part 2 - Lecture
09:18
22
Custom Sequences - Part 2A - Coding
17:56
23
Custom Sequences - Part 2B - Coding
34:50
24
Custom Sequences - Part 2C - Coding
21:11
25
Sorting Sequences - Lecture
17:53
26
Sorting Sequences - Coding
25:53
27
List Comprehensions - Lecture
17:56
28
List Comprehensions - Coding
47:17
29
Project Description
07:33
30
Project Solution: Goal 1
40:33
31
Project Solution: Goal 2
12:14
32
Introduction
02:54
33
Iterating Collections - Lecture
11:20
34
Iterating Collections - Coding
20:19
35
Iterators - Lecture
06:22
36
Iterators - Coding
11:45
37
Iterators and Iterables - Lecture
11:23
38
Iterators and Iterables - Coding
28:04
39
Example 1 - Consuming Iterators Manually
26:32
40
Example 2 - Cyclic Iterators
31:34
41
Lazy Iterables - Lecture
03:45
42
Lazy Iterables - Coding
15:00
43
Python's Built-In Iterables and Iterators - Lecture
02:25
44
Python's Built-In Iterables and Iterators - Coding
14:22
45
Sorting Iterables
08:52
46
The iter() Function - Lecture
06:27
47
The iter() Function - Coding
14:00
48
Iterating Callables - Lecture
04:43
49
Iterating Callables - Coding
15:54
50
Example 3 - Delegating Iterators
07:42
51
Reversed Iteration - Lecture
09:50
52
Reversed Iteration - Coding
20:01
53
Caveat: Using Iterators as Function Arguments
18:47
54
Project Description
03:30
55
Project Solution: Goal 1
05:52
56
Project Solution: Goal 2
07:43
57
Introduction
01:22
58
Yielding and Generator Functions - Lecture
17:39
59
Yielding and Generator Functions - Coding
17:34
60
Example - Fibonacci Sequence
15:32
61
Making an Iterable from a Generator - Lecture
07:00
62
Making an Iterable from a Generator - Coding
06:41
63
Example - Card Deck
11:05
64
Generator Expressions and Performance - Lecture
09:18
65
Generator Expressions and Performance - Coding
30:20
66
Yield From - Lecture
02:37
67
Yield From - Coding
12:30
68
Project Description
04:16
69
Project Solution: Goal 1
41:47
70
Project Solution: Goal 2
15:58
71
Introduction
04:23
72
Aggregators - Lecture
10:06
73
Aggregators - Coding
26:29
74
Slicing - Lecture
03:19
75
Slicing - Coding
11:34
76
Selecting and Filtering - Lecture
10:03
77
Selecting and Filtering - Coding
15:08
78
Infinite Iterators - Lecture
05:30
79
Infinite Iterators - Coding
18:50
80
Chaining and Teeing - Lecture
08:41
81
Chaining and Teeing - Coding
18:53
82
Mapping and Reducing - Lecture
15:55
83
Mapping and Reducing - Coding
18:17
84
Zipping - Lecture
03:16
85
Zipping - Coding
06:55
86
Grouping - Lecture
10:01
87
Grouping - Coding
27:02
88
Combinatorics - Lecture
09:31
89
Combinatorics - Coding (Product)
21:27
90
Combinatorics - Coding (Permutation, Combination)
20:50
91
Project - Description
11:50
92
Project Solution: Goal 1
43:51
93
Project Solution: Goal 2
38:42
94
Project Solution: Goal 3
07:18
95
Project Solution: Goal 4
50:39
96
Introduction
08:03
97
Context Managers - Lecture
22:47
98
Context Managers - Coding
37:11
99
Caveat when used with Lazy Iterators
03:50
100
Not just a Context Manager
07:34
101
Additional Uses - Lecture
06:05
102
Additional Uses - Coding
36:04
103
Generators and Context Managers - Lecture
10:47
104
Generators and Context Managers - Coding
13:14
105
The contextmanager Decorator - Lecture
09:43
106
The contextmanager Decorator - Coding
24:27
107
Nested Context Managers
34:29
108
Project - Description
07:18
109
Project Solution: Goal 1
17:51
110
Project Solution: Goal 2
11:02
111
Introduction
07:42
112
Coroutines - Lecture
25:36
113
Coroutines - Coding
17:12
114
Generator States - Lecture
03:12
115
Generator States - Coding
06:48
116
Sending to Generators - Lecture
14:49
117
Sending to Generators - Coding
20:05
118
Closing Generators - Lecture
08:28
119
Closing Generators - Coding
27:21
120
Sending Exceptions to Generators - Lecture
07:54
121
Sending Exceptions to Generators - Coding
24:18
122
Using Decorators to Prime Coroutines - Lecture
05:42
123
Using Decorators to Prime Coroutines - Coding
08:47
124
Yield From - Two-Way Communications - Lecture
10:30
125
Yield From - Two-Way Communications - Coding
15:13
126
Yield From - Sending Data - Lecture
05:57
127
Yield From - Sending Data - Coding
26:56
128
Yield From - Closing and Return - Lecture
06:24
129
Yield From - Closing and Return - Coding
14:17
130
Yield From - Throwing Exceptions - Lecture
02:48
131
Yield From - Throwing Exceptions - Coding
25:31
132
Application - Pipelines - Lecture
04:35
133
Application - Pipelines - Pulling Data
11:28
134
Application - Pipelines - Pushing Data
09:05
135
Application - Pipelines - Broadcasting Data
32:39
136
Project Description
01:50
137
Project Solution
14:19
Unlock unlimited learning

Get instant access to all 136 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

What courses are similar to Python 3: Deep Dive (Part 2 - Iteration, Generators)?

More courses by Udemy

Frequently asked questions

What prerequisites are needed for this course?
Students should have a solid understanding of Python fundamentals, including basic syntax, data types, and control flow. Familiarity with Python 3 is necessary as the course explores advanced topics like iterators, generators, and context managers. It's also recommended that students have completed Part 1 of the Python 3: Deep Dive series or possess equivalent experience.
What projects will be completed in this course?
Throughout the course, students will engage in several projects designed to reinforce the concepts covered. These projects involve practical applications of iterators, generators, and context managers to solve complex problems. Each section concludes with a project that challenges students to apply what they have learned, ensuring a comprehensive understanding of the course material.
Who is the target audience for this course?
The course is intended for intermediate Python programmers who are looking to deepen their understanding of iteration and generator functions in Python 3. It's ideal for developers seeking to enhance their skills in writing efficient and Pythonic code using advanced constructs like itertools, context managers, and generator-based coroutines.
What specific tools or modules are covered in the course?
The course covers the itertools module extensively, highlighting its lesser-known functionalities. Students will also learn about Python's built-in iterables and iterators, and how to use context managers effectively. These tools are essential for writing efficient Python code and understanding the language's iteration protocols.
What topics are not covered in this course?
This course does not cover third-party libraries or frameworks, focusing exclusively on Python's standard library and the CPython distribution. While these libraries are important in the Python ecosystem, the course aims to provide a deep understanding of Python's native capabilities, particularly with iteration and generators.
How much time should I expect to commit to this course?
The course consists of 137 lessons and includes both lectures and coding exercises. Although the exact runtime is unspecified, students should expect to spend a significant amount of time practicing coding exercises and completing projects to fully grasp the advanced topics covered.
How will this course benefit my career in software development?
By mastering advanced iteration techniques, comprehensions, and generators, developers can write more efficient and maintainable Python code. The skills acquired in this course are valuable for roles that require proficiency in Python, such as data science, web development, and software engineering, making it a beneficial addition to a developer's skill set.