Skip to content

Commit 2258e97

Browse files
authored
Update list-comprehension.md
1 parent 70274dd commit 2258e97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

basics/list-comprehension.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ print(arr)
2222
The example above shows a list of animals and the for loop iterates through the list of animals and the if statement filters the list and only adds the animal if their name is exactly 3 characters long.
2323

2424
## With List Comprehension
25-
```
25+
```python
2626
animals = ["dog", "cat", "giraffe", "donkey", "ape"]
2727

2828
arr = [i for i in animals if len(i) == 3]

0 commit comments

Comments
 (0)