Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Speedy category for Flatten a List by PythonWithPI
def flat_list(array):
r=[]
a=array
for i in a:
if type(i)==int:
r.append(i)
else:
r.extend(flat_list(i))
return r
March 12, 2016
Comments: