Flatten array
This commit is contained in:
2
helpers/dataHelper.py
Normal file
2
helpers/dataHelper.py
Normal file
@@ -0,0 +1,2 @@
|
||||
def flatten(l):
|
||||
return flatten(l[0]) + (flatten(l[1:]) if len(l) > 1 else []) if type(l) is list else [l]
|
||||
Reference in New Issue
Block a user