Manipulating MySQL Sets

Sebastian Bassi sbassi at clubdelarazon.org
Sun Dec 13 11:26:53 EST 2009


On Sun, Dec 13, 2009 at 12:48 PM, Victor Subervi
<victorsubervi at gmail.com> wrote:
> Who said I was expecting a string? I don't know what I'm expecting! I need
> to be able to parse this thing, whatever it is. You say it's a Python Set
> object. How do I parse it? Googling has been disappointing.

You can walk thought a set object like any iterable object like

for x in myset:
    #do something like parse it.

If you want to slice it, convert it to a list:

mylist = list(myset)

Or read about sets:
http://docs.python.org/library/sets.html



More information about the Python-list mailing list