1

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?

Vlad Balanescu
  • 664
  • 5
  • 27
  • Check [How-to-convert-list-to-string](http://stackoverflow.com/questions/5618878/how-to-convert-list-to-string) for several ways to do it. – Praveen Nov 21 '15 at 09:07
  • Actually `['t','u','p','l','e']` is already a list of strings. The strings are of length 1. – Paul Cornelius Nov 21 '15 at 10:28

1 Answers1

5

All you need to join.

In [33]: [''.join(['t','u','p','l','e'])]
Out[33]: ['tuple']
Vishnu Upadhyay
  • 5,043
  • 1
  • 13
  • 24