Re: sub-list extraction, logical indexation

2009-08-18 Thread Terry Reedy
Pierre wrote: Hello Everyone, I would like to know if it is possible to extract a sub-list from a list ? typically if : L =[[1, 2, 3],[4, 5, 6],[3] ] How to extract easily the elements 0 and 2 of L in order to get : L2 =[[1, 2, 3],[3] ] L2 = [L[0],L[2]] Moreover, I would like to know if

Re: sub-list extraction, logical indexation

2009-08-17 Thread Vlastimil Brom
2009/8/17 MRAB : > Diez B. Roggisch wrote: >> >> Pierre wrote: >> >>> Hello Everyone, >>> >>> I would like to know if it is possible to extract a sub-list from a >>> list ? >>> >>> typically if : >>> >>> L =[[1, 2, 3],[4, 5, 6],[3] ] >>> >>> How to extract easily the elements 0 and 2 of L in order

Re: sub-list extraction, logical indexation

2009-08-17 Thread MRAB
Diez B. Roggisch wrote: Pierre wrote: Hello Everyone, I would like to know if it is possible to extract a sub-list from a list ? typically if : L =[[1, 2, 3],[4, 5, 6],[3] ] How to extract easily the elements 0 and 2 of L in order to get : L2 =[[1, 2, 3],[3] ] Moreover, I would like to kn

Re: sub-list extraction, logical indexation

2009-08-17 Thread Diez B. Roggisch
Pierre wrote: > Hello Everyone, > > I would like to know if it is possible to extract a sub-list from a > list ? > > typically if : > > L =[[1, 2, 3],[4, 5, 6],[3] ] > > How to extract easily the elements 0 and 2 of L in order to get : > > L2 =[[1, 2, 3],[3] ] > > Moreover, I would like to k