After a MySQL select statement, I am left with the following:
set([('[email protected]',), ('[email protected]',), ('[email protected]',), ('[email protected]',), ('[email protected]',), ('[email protected]',), ('[email protected]',), ('[email protected]',)])
What I would like to have is a
emaillist = "\n".join(queryresult)
to in the end, have a string:
[email protected]
[email protected]
[email protected]
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