sets and subsets

Rich Krauter rmkrauter at
Wed Feb 11 22:28:38 CET 2004

> How do I test set c to find what it contains and
then look at set b to 
> see if it contains any of those same numbers, and if
so, remove them.

Sorry, I hit something and it sent the last message
before I was finished:

use sets module, or 

>>> b = []
>>> for item in a:
>>> ... if item not in c:
>>> ...    b.append(i)  

You may want to review the properties of lists. A
quick skim of the docs every once in a while has done
me a lot of good.


Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.

More information about the Python-list mailing list