Nick Craig-Wood wrote:
>
> Sets are pretty fast too, and have the advantage of flexibility in
> that you can put any numbers in you like
>

I know this is self-evident to most of the people reading this, but I
thought it worth pointing out that this is a great way to test
membership in range(lo, hi, step) without doing "the necessary
algebra".

i.e.  n in set(xrange(0, 10000, 23)) ...


Peace,
~Simon

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

Reply via email to