[EMAIL PROTECTED] writes:
> {x*x for x in xrange(10)}
> {x:x*x for x in xrange(10)}

I've always just used:

set(x*x for x in xrange(10))
dict((x,x*x) for x in xrange(10))

I didn't even realize that you could write sets with {...}.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to