Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Flatten a List by kazuki.h
def flat_list(array):
result = []
for element in array:
if isinstance(element, list): result += flat_list(element)
else: result.append(element)
return result
Aug. 11, 2022
Comments: