travis_commit
This commit is contained in:
@ -70,7 +70,7 @@ count_vowels('foobar') # 3
|
|||||||
count_vowels('gym') # 0
|
count_vowels('gym') # 0
|
||||||
```
|
```
|
||||||
|
|
||||||
### deepFlatten
|
### deep_flatten
|
||||||
|
|
||||||
Deep flattens a list.
|
Deep flattens a list.
|
||||||
|
|
||||||
@ -78,6 +78,7 @@ Use recursion. Use `list.extend()` with an empty array (`result`) and the spread
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
|
|
||||||
|
|
||||||
def spread(arg):
|
def spread(arg):
|
||||||
ret = []
|
ret = []
|
||||||
for i in arg:
|
for i in arg:
|
||||||
@ -92,6 +93,7 @@ def spread(arg):
|
|||||||
result.extend(spread(list(map(lambda x : deep(x) if type(x) == list else x,arr))))
|
result.extend(spread(list(map(lambda x : deep(x) if type(x) == list else x,arr))))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|||||||
@ -6,6 +6,7 @@ Use recursion. Use `list.extend()` with an empty array (`result`) and the spread
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
|
|
||||||
|
|
||||||
def spread(arg):
|
def spread(arg):
|
||||||
ret = []
|
ret = []
|
||||||
for i in arg:
|
for i in arg:
|
||||||
@ -20,6 +21,7 @@ def spread(arg):
|
|||||||
result.extend(spread(list(map(lambda x : deep(x) if type(x) == list else x,arr))))
|
result.extend(spread(list(map(lambda x : deep(x) if type(x) == list else x,arr))))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|||||||
Reference in New Issue
Block a user