I have a list of string like:
s = [("abc","bcd","cde"),("123","3r4","32f")]
Now I want to convert this to the following:
output = ["abcbcdcde","1233r432f"]
What is the pythonic way to do this? THanks
>>> [''.join(x) for x in s]
['abcbcdcde', '1233r432f']
>>> map(''.join, s)
['abcbcdcde', '1233r432f']
That should do it
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