fix deep_flatten

This commit is contained in:
Rohit Tanwar
2018-01-21 10:56:40 +05:30
parent e75808084f
commit 20a21a3551
5 changed files with 20 additions and 29 deletions

View File

@ -16,19 +16,13 @@ def spread(arg):
ret.append(i)
return ret
def deep_flatten(arr):
def deep_flatten(arr):
result = []
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
```
```python