<div class="gmail_quote">On Sun, Dec 13, 2009 at 12:10 PM, Carsten Haese <span dir="ltr"><<a href="mailto:carsten.haese@gmail.com">carsten.haese@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Victor Subervi wrote:<br>
> I need to get at the individual elements of the set (that which is<br>
> between the single quotes).<br>
<br>
</div>It's not quite clear what you mean by "get at the individual elements",<br>
so I'll just show you a couple of things you can do to a set, and maybe<br>
one of them comes close to what you need:<br>
<br>
>>> from sets import Set<br>
>>> aSet = Set(['Small', 'Extra-small', 'Medium'])<br>
<br>
Do something for each element:<br>
<br>
>>> for element in aSet:<br>
... print element<br>
...<br>
Small<br>
Extra-small<br>
Medium<br>
<br>
Convert the set to list:<br>
<br>
>>> list(aSet)<br>
['Small', 'Extra-small', 'Medium']<br>
<br>
Test membership in the set:<br>
<br>
>>> 'Small' in aSet<br>
True<br>
>>> 'Banana' in aSet<br>
False<br>
<br></blockquote>Carsten, thank you (once again ;) for your patience. I didn't know I had to import something.<br>Thanks again,<br>V<br></div>