If I have a list of chars:
a = ['a','b','c','d']
How do I convert it into a single string?
a = 'abcd'
Use the join method of the empty string to join all of the strings together with the empty string in between, like so:
join
>>> a = ['a', 'b', 'c', 'd'] >>> ''.join(a) 'abcd'
1.4m articles
1.4m replys
5 comments
57.0k users