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 Leonid_Zhulikov
def flat_list(a): #variables have short names to fit 140 characters. a = array
r=[] #r = result
for e in a: #e = element
if type(e) is list:
r+=flat_list(e)
else:
r.append(e)
return r
April 10, 2020