Skip to content

Commit a835856

Browse files
authored
Merge pull request darkprinx#32 from pratikb0501/patch-4
Update Day_21.md
2 parents b393683 + ba7d0cc commit a835856

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Status/Day_21.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ li = [12,24,35,70,88,120,155]
1919
li = [x for (i,x) in enumerate(li) if i not in (0,4,5)]
2020
print li
2121
```
22-
2322
---
2423

2524
**My Solution: Python 3**
@@ -28,6 +27,11 @@ print li
2827
li = [12,24,35,70,88,120,155]
2928
li = [li[i] for i in range(len(li)) if i not in (0,4,5)]
3029
print(li)
30+
```
31+
```python
32+
li = [12, 24, 35, 70, 88, 120, 155]
33+
print(list(j for i, j in enumerate(li) if i != 0 and i != 4 and i != 5))
34+
3135
```
3236

3337
---

0 commit comments

Comments
 (0)