Section 4: Loops

In this section, we'll discuss:
- for loops -- iterating over strings
- how does a "for" loop really work?
- what about the indexes?
- the "enumerate" function
- break and continue
- the "else" clause in Python loops
- iterating a number of times with "range"
- iterable vs. non-iterable objects
- "while" loops
- "for" vs "while" -- when to use each
Section 4: Loops
loops-syllabus.pdf
24.8 KB
Intro Python, section 4.ipynb
11.3 KB
30 for loops
6 mins
31 indexes and enumerate
5 mins
32 range
3 mins
33 Exercise 4 -- loop exercises
2 mins
34 Solution 4 -- loop exercises
5 mins
35 break and continue
4 mins
36 else on loops
5 mins
37 while loops
10 mins