python: list manipulation

Posted by Jason S on Stack Overflow See other posts from Stack Overflow or by Jason S
Published on 2010-04-27T17:17:23Z Indexed on 2010/04/27 17:23 UTC
Read the original article Hit count: 160

Filed under:
|

I have a list L of objects (for what it's worth this is in scons). I would like to create two lists L1 and L2 where L1 is L with an item I1 appended, and L2 is L with an item I2 appended.

I would use append but that modifies the original list.

How can I do this in Python? (sorry for the beginner question, I don't use the language much, just for scons)

© Stack Overflow or respective owner

Related posts about python

Related posts about lists