Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Flatten a List by PiotrStachowiak
def flat_list(a):
l=[]
def k(x):
for i in x:
if type(i)==list:
k(i)
else:l.append(i)
k(a)
return l
Nov. 27, 2016