travis_commit

This commit is contained in:
Rohit Tanwar
2018-01-16 15:05:34 +00:00
parent 45b9722566
commit a23c7be7e5
2 changed files with 30 additions and 1 deletions

View File

@ -4,7 +4,8 @@ Deep flattens a list.
Use recursion. Use `list.extend()` with an empty array (`result`) and the spread function to flatten a list. Recursively flatten each element that is a list.
```python
```python
def spread(arg):
ret = []
for i in arg:
@ -18,6 +19,7 @@ def spread(arg):
result = []
result.extend(spread(list(map(lambda x : deep(x) if type(x) == list else x,arr))))
return result
```
```python