I ended up using this code to solve my problem.

> for a, b, c, d in s:
>   if not query.has_key((a,b)): query[(a,b)] = []
>    query[(a,b)].append("%s=%s" % (c, d))

> for (a,b), v in query.items():
>    print a, b, ", ".join(v)

I'm relatively new to python/programming in general.  I usually write
in php and have produced this website and application
http://my-pbs.sf.net  One of the things that makes php easy to program
in is the documentation provided at php.net.  It is extremely easy to
find the correct functions to use.  Are there any sites you could
recommend that discusses structures of loops and strings?  I have an
OReilly book called, "Programming Python" and it focuses to much on
showing examples rather than structure and methods.

Thanks for the help.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to