Skip to content
This repository was archived by the owner on Jun 17, 2024. It is now read-only.

Update 06-for-loops.md #6

Merged
merged 2 commits into from
Dec 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions episodes/06-for-loops.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ IndexError Traceback (most recent call last)
IndexError: list index out of range
```

A `for loop` is a better solution:
A `for` loop is a better solution:

```python
odds = [1, 3, 5, 7]
Expand Down Expand Up @@ -108,7 +108,7 @@ for num in odds:
11
```

A `for loop` repeats an operation -- in this case, printing -- once for each element it encounters in a collection. The general structure of a loop is:
A `for` loop repeats an operation -- in this case, printing -- once for each element it encounters in a collection. The general structure of a loop is:

```python
for variable in collection:
Expand Down