On Mon, 2005-01-31 at 09:06, Danny Yoo wrote > > Here's a small example with sets to make it more clear how this set > manipulation stuff will work: > > ### > >>> from sets import Set > >>> numbers = range(20) > >>> primes = [2, 3, 5, 7, 11, 13, 17, 19] > >>> Set(numbers) - Set(primes) > Set([0, 1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18]) > ### Thanks Danny, sets work great (inbuilt for 2.4) I'd never heard of them before today. I look forward to finding other uses for them. Now I've just got to work out how to tag a list of id's... There doesn't seem to be a way to tag a known id, it has to be tagged by reference from an id above or below which seems odd!
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor