xxxxxxxxxx
A more generic way to convert python lists to strings would be:
>>> xs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>>> ''.join(map(str, xs))
'12345678910'
xxxxxxxxxx
# define a list of strings
my_list = ['Hello', 'world', '!']
# join the strings in the list into a single string with a space separator
result = ' '.join(my_list)
print(result) #print as Hello world !
# join the strings in the list into a single string with a dash separator
result = '-'.join(my_list)
print(result) #print as Hello-world-!
# join the strings in the list into a single string without a separator
result = ''.join(my_list)
print(result) #print as Helloworld!