Moving items from list to list

HMS Surprise john at datavoiceint.com
Thu Jun 14 18:30:05 CEST 2007


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 more than two.

Thanks

jh




More information about the Python-list mailing list