Hi friends.
Why code below don't call the inner function myext(arrayn)?
def flatlist(array):
arrayn = array
def my_ext(array_n): # function for extend list
rez = []
for j in array_n:
if isinstance(j,list):
rez.extend(j)
else:
rez.append(j)
array_n = rez
return array_n
for ti_exp in range(10): my_ext(array_n) # repeat function 10 times for extend of inner lists
return array_n
Created at: 2020/03/26 14:03; Updated at: 2020/04/02 07:34