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 katnic
def flat_list(array):
result = []
for a in array:
if isinstance(a, int): result.append(a)
else: result += flat_list(a)
return result
Aug. 28, 2021