Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Recursion solution in Clear category for Flatten a List by ludek.reif
def flat_list(array):
numbers = []
for subs in array:
if type(subs) == list:
numbers += flat_list(subs)
else:
numbers.append(subs)
return numbers
Sept. 19, 2019
Comments: