SymPy set objects are immutable, like every other SymPy object, so pop
could not work. However, iterating over the set does work. For finite
sets, the easiest way is to convert to a list. For countable infinite
sets, converting to a list won't work obviously, but you can use
iter(s) and call next() on it. Iteration is generally implemented so
that it hits every element (for instance, iterating over S.Integers
gives 0, 1, -1, 2, -2, ...). For uncountable sets like intervals, all
you can't iterate, but you can check containment using "in", or
intersect with other sets.
Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
sympy+un...@googlegroups.com.
> To post to this group, send email to
sy...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/sympy.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/sympy/733f8e55-e2ad-438e-bd2a-792524801685%40googlegroups.com.
>
> For more options, visit
https://groups.google.com/d/optout.