This commit is contained in:
Hodza Alban
2018-02-28 08:34:07 +01:00
committed by GitHub
parent b011d16324
commit 169057b6b7

View File

@ -6,7 +6,7 @@ Use `filter()` to filter out falsey values (False, None, 0, and "").
```python
def compact(arr):
return list(filter(lambda x: bool(x), arr))
return list(filter(bool, arr))
```
``` python