Skip to content

Instantly share code, notes, and snippets.

@yijia2413
Created January 11, 2019 02:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yijia2413/01a272b4934b517319de952fb9b0c787 to your computer and use it in GitHub Desktop.
Save yijia2413/01a272b4934b517319de952fb9b0c787 to your computer and use it in GitHub Desktop.
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