update insertion_sort

This commit is contained in:
Rohit Tanwar
2018-02-20 17:08:10 +05:30
parent 9e7878b00d
commit 7cc78ca4c4
28 changed files with 1252 additions and 1222 deletions

View File

@ -1,14 +1,14 @@
### compact
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))
```
``` python
compact([0, 1, False, 2, '', 3, 'a', 's', 34]) # [ 1, 2, 3, 'a', 's', 34 ]
### compact
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))
```
``` python
compact([0, 1, False, 2, '', 3, 'a', 's', 34]) # [ 1, 2, 3, 'a', 's', 34 ]
```