Update compact snippet

Use None instead of bool
This commit is contained in:
Angelos Chalaris
2020-03-10 21:59:34 +02:00
parent c1b218d8af
commit 458f5606cf

View File

@ -9,7 +9,7 @@ Use `filter()` to filter out falsey values (`False`, `None`, `0`, and `""`).
```py
def compact(lst):
return list(filter(bool, lst))
return list(filter(None, lst))
```
```py