new
This commit is contained in:
parent
25b06bd8d6
commit
216a7a6eeb
8
u3/flatten_array.py
Normal file
8
u3/flatten_array.py
Normal file
@ -0,0 +1,8 @@
|
||||
def flatten(iterable):
|
||||
result = []
|
||||
for item in iterable:
|
||||
if isinstance(item, list):
|
||||
result.extend(flatten(item))
|
||||
elif item is not NONE:
|
||||
result.append(item)
|
||||
return result
|
||||
Loading…
Reference in New Issue
Block a user