This is more of a python question than a Sage question, but
anyway...I'm trying to iterate over a list, producing a sequence of
new lists, each of which is obtained from the original list by
deleting one object.  I've tried:

for x in lst:
   lstc=copy(lst)
   print lstc.remove(x)

But this doesn't work - can anybody tell me what I'm doing wrong, and
what I should be doing?  I can get the effect I want by iterating over
the indices of the list, but I'd like to know why this little snippet
of code doesn't work.

Thanks,
Alasdair
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to