Skip to content

Commit decbe90

Browse files
committed
summary
1 parent 149d361 commit decbe90

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

loops.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,15 @@ If you're using Python 3.2 or older you need to use `stuff[:]` instead
288288
of `stuff.copy()` and `stuff[:] = []` instead of `stuff.clear()`.
289289
`stuff[:]` is a slice of the whole list, just like `stuff[0:]`.
290290

291+
## Summary
292+
293+
- A loop means repeating something multiple times.
294+
- While loops repeat something as long as a condition is true, and
295+
they check the condition only in the beginning.
296+
- For loops can be used for repeating something to each item in a list.
297+
- The `break` keyword can be used to interrupt the innermost loop at
298+
any time.
299+
291300
## Exercises
292301

293302
1. Back in "Using if, else and elif" we created a program that asked

0 commit comments

Comments
 (0)