Convert multi-dimensional list to a 1D list in Python

Posted by Sayan on Stack Overflow See other posts from Stack Overflow or by Sayan
Published on 2010-06-02T22:08:06Z Indexed on 2010/06/02 22:14 UTC
Read the original article Hit count: 212

Filed under:

Hello,

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?

Thanks,
Sayan

© Stack Overflow or respective owner

Related posts about python