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