travis_commit

This commit is contained in:
Rohit Tanwar
2018-01-16 15:15:03 +00:00
parent b8e2218140
commit 12efb877f5
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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