Reputation: 1077
Any way to access the values of BIF "set()" without using an iterator.
For instance, I got this output from my code:
>>> set([1,2,3])
How can I access it as a list? Like:
>>> [1,2,3]
Upvotes: 14
Views: 19881
Reputation: 27266
Use a simple type conversion:
>>> a
set([1, 2, 3])
>>> list(a)
[1, 2, 3]
Upvotes: 25