Re: Moving items from list to list

2007-06-14 Thread Gabriel Genellina
En Thu, 14 Jun 2007 14:23:14 -0300, Evan Klitzke <[EMAIL PROTECTED]> escribió: > On 6/14/07, HMS Surprise <[EMAIL PROTECTED]> wrote: >> >> Just wondered if there was some python idiom for moving a few items >> from one list to another. I often need to delete 2 or 3 items from one >> list and put t

Re: Moving items from list to list

2007-06-14 Thread George Sakkis
On Jun 14, 12:30 pm, HMS Surprise <[EMAIL PROTECTED]> wrote: > Just wondered if there was some python idiom for moving a few items > from one list to another. I often need to delete 2 or 3 items from one > list and put them in another. Delete doesn't seem to have a return > value. I don't care whi

Re: Moving items from list to list

2007-06-14 Thread HMS Surprise
Thanks. That will work. The 2nd, smaller lst starts out empty but this is easily adapted. jh -- http://mail.python.org/mailman/listinfo/python-list

Re: Moving items from list to list

2007-06-14 Thread Evan Klitzke
On 6/14/07, HMS Surprise <[EMAIL PROTECTED]> wrote: > > Just wondered if there was some python idiom for moving a few items > from one list to another. I often need to delete 2 or 3 items from one > list and put them in another. Delete doesn't seem to have a return > value. I don't care which items

Moving items from list to list

2007-06-14 Thread HMS Surprise
Just wondered if there was some python idiom for moving a few items from one list to another. I often need to delete 2 or 3 items from one list and put them in another. Delete doesn't seem to have a return value. I don't care which items I get so now I just use a couple of pops or a for loop for m