Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Naive solution in Clear category for Flatten a List by Sim0000
def flat_list(L):
r = []
for i in L:
r.extend(flat_list(i)) if isinstance(i, list) else r.append(i)
return r
April 25, 2014