Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
list of tuples to string with split
a = [('a', 'etwrfb', 'casdf'), ('1', 2, '35235')]
res = '\n'.join(','.join(map(str, i)) for i in a)
# 'a,etwrfb,casdf\n1,2,35235'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.