A multidimensional list like l=[[1,2],[3,4]] could be converted to a 1D one by doing sum(l,[]). Can anybody please explain how that happens?
l=[[1,2],[3,4]]
sum(l,[])
The + operator concatenates lists and the starting value is [] an empty list.