Created
January 11, 2019 02:52
-
-
Save yijia2413/01a272b4934b517319de952fb9b0c787 to your computer and use it in GitHub Desktop.
list of tuples to string with split
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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