How about (for 2.4 or 2.3 using "from collections import Set as set":

def combine(source, special='foo'):
    parts = set(source)
    if special in parts:
        return ', '.join([special] + list(parts - set([special])))
    return ', '.join(parts)

--Scott David Daniels
[EMAIL PROTECTED]

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

Reply via email to