Dennis Lee Bieber wrote: > range() is what used to be xrange() -- an on-demand generator of > values. You created a set containing a single generator. Try something > like: > > 5 in {list(range(10))}
No. {expr} is always a set with a single element. >>> {range(10)} {range(0, 10)} That element cannot be a list, by the way, because lists aren't hashable. >>> {list(range(10))} Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unhashable type: 'list' Peter -- http://mail.python.org/mailman/listinfo/python-list