Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple recursive solution in Clear category for Flatten a List by thealfest1
def flat_list(array):
res = []
for e in array:
if type(e) is list:
res.extend(flat_list(e))
else:
res.append(e)
return res
March 18, 2019
Comments: