u3
This commit is contained in:
parent
3e05a116f2
commit
f995f86404
10
u3/skatule.py
Normal file
10
u3/skatule.py
Normal file
@ -0,0 +1,10 @@
|
||||
def flatten(iterable):
|
||||
if(iterable ==[] or iterable is None):
|
||||
return []
|
||||
r = []
|
||||
for i in iterable:
|
||||
if(type(i) is list):
|
||||
r.extend(flatten(i))
|
||||
else:
|
||||
r.append(i)
|
||||
return r
|
||||
Loading…
Reference in New Issue
Block a user