Flatten array

This commit is contained in:
2018-09-26 08:41:50 +02:00
parent 99d00cf6a9
commit 2887b7acf0
3 changed files with 11 additions and 8 deletions

2
helpers/dataHelper.py Normal file
View 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]