En Thu, 23 Aug 2007 23:54:14 -0300, bambam <[EMAIL PROTECTED]> escribi�:

> After examining your suggestion, I realised that another thing
> I am interested in could be generalised: I want the complement
> of the set of ports in pages, given a universal set in tempList.
> Ignoring the break condition for the moment, and my problem
> with int(port)/str(port), would you have offered a different solution
> if I had asked for the relative complement of a small set?
>
> a= ['a','b','c']
> b= ['b']
> c= a-b #set theoretic difference, a\b, a.~b, ['a','c']

If you want a set - just use a set:

py> a = set(['a','b','c'])
py> b = set(['b'])
py> c = a-b
py> c
set(['a', 'c'])

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to