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?
答案 0 :(得分:5)
All you need to join.
In [33]: [''.join(['t','u','p','l','e'])]
Out[33]: ['tuple']