After a MySQL select statement, I am left with the following:
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',)])
What I would like to have is a
emaillist = "\n".join(queryresult)
to in the end, have a string:
1@a.com
2@b.net
3@c.com
etc
What would be the proper way to convert this nested tuple into string?
As long as you're sure you have just one element per tuple:
'\n'.join(elem[0] for elem in queryresult)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With