Alex Rivera | Logout

python decompose a list

Asked 2011-06-12T01:41:45.857
11

I remember I once seen a operator which is able to decompose a list in python.

for example

[[1],[2],[3]]

by applying that operator, you get

[1], [2], [3]

what is that operator, any help will be appreciated.

Edit
Report

1 Answer

0

This can be achieved by running sum(list_name,[]) as mentioned here.

You may also find this question on flattening shallow lists relevant.

answered 2011-06-12T01:48:03.407

Your Answer