Reputation: 674
I have a list of chars, something like
['t','u','p','l','e']
and I want to create a list of Strings out of it:
['tuple'
I tried to initialise an empty array and append or += to it but this still returns a list of chars. How can I concatenate strings?
Upvotes: 1
Views: 134
Reputation: 5061
All you need to join.
In [33]: [''.join(['t','u','p','l','e'])]
Out[33]: ['tuple']
Upvotes: 5