Issue #4
This commit is contained in:
@ -6,7 +6,7 @@ Use `filter()` to filter out falsey values (False, None, 0, and "").
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
def compact(arr):
|
def compact(arr):
|
||||||
return list(filter(lambda x: bool(x), arr))
|
return list(filter(bool, arr))
|
||||||
```
|
```
|
||||||
|
|
||||||
``` python
|
``` python
|
||||||
|
|||||||
Reference in New Issue
Block a user