how to duplicate array entries

Sebastian sebastian.langer at gmx.de
Mon Jan 11 07:24:07 CET 2010


On Jan 11, 4:21 pm, Sebastian <sebastian.lan... at gmx.de> wrote:

> I also tried [[b,b,b] for b in x] which led to [[1,2,3],[1,2,3],
> [1,2,3]]

Sorry, I have to correct myself. The quoted line above resulted in
[[1,1,1],[2,2,2],[3,3,3]] of course!

Cheers, Sebastian



More information about the Python-list mailing list