Skip to content

Commit 4c220ea

Browse files
committed
small changes after Akuli#13
1 parent 93a00c2 commit 4c220ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

basics/lists-and-tuples.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,18 +141,18 @@ We'll talk more about loops [in the next chapter](loops.md).
141141
>>>
142142
```
143143

144-
Another useful things about list is **comprehension**.
145-
**Comprehension** is a way to construct a list in single line. It makes our code more clean, shorter and easier to read.
144+
Another useful thing about lists is **list comprehension**.
145+
It's a handy way to construct a list in single line. It often makes code cleaner, shorter and easier to read.
146146

147147
```python
148148
>>> numbers = [1,2,3,4,5]
149-
>>> numbers_squared = [ number ** 2 for number in numbers ]
149+
>>> numbers_squared = [number ** 2 for number in numbers]
150150
>>> numbers_squared
151151
[1, 4, 9, 16, 25]
152152
>>>
153153
```
154154

155-
without comprehension:
155+
Without a list comprehension, doing the same thing looks like this:
156156

157157
```python
158158
>>> numbers = [1,2,3,4,5]

0 commit comments

Comments
 (0)