mirror of
https://github.com/Xevion/exercism.git
synced 2025-12-07 05:15:03 -06:00
flatten and space age exercise
This commit is contained in:
3
python/flatten-array/flatten_array.py
Normal file
3
python/flatten-array/flatten_array.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from functools import partial
|
||||
flatten_base = lambda l : [l] if type(l) != list else sum(map(flatten_base, l), [])
|
||||
flatten = lambda l : list(filter(lambda item : item is not None, flatten_base(l)))
|
||||
Reference in New Issue
Block a user