11 lines
253 B
Python
11 lines
253 B
Python
def flatten(iterable):
|
|
pusti = []
|
|
for gns in iterable:
|
|
if gns is None:
|
|
continue
|
|
elif isinstance(gns, (list, tuple)):
|
|
pusti.extend(flatten(gns))
|
|
else:
|
|
pusti.append(gns)
|
|
return pusti
|