Try it and see
>>> something=set([(' 1@a.com ',), (' 2@b.net ',), (' 3@c.com ',), (' 4@d.com ',), (' 5@e.com ',), (' 6@f.net ',), (' 7@h.net ',), (' 8@g.com ',)]) >>> print '\n'.join(''.join(s) for s in something) 6@f.net 7@h.net 2@b.net 1@a.com 8@g.com 5@e.com 4@d.com 3@c.com
Note. A join can only work with strings, but tuple elements are set elements. To make the connection work, you need to iterate over the set to convert each element to a string. Finally, once you are done, you can join them as your heart desires.
On a side note. The round way :-)
>>> print "\n".join(re.findall("\'(.*?)\'",pprint.pformat(something))) 1@a.com 2@b.net 3@c.com 4@d.com 5@e.com 6@f.net 7@h.net 8@g.com
source share