String and list both are the different data type of different domain and structure of both data type is different. So when we want to convert list to string, we must aware of string as well as list in python.
Example of conversion-
List=['Hello','String']
And we want to make a string which is look like -
S='HelloString'
Program -
l=['Hello','String']
s=str(l)
print(s)
s=''.join(l)
print(s)
s='-'.join(l)
print(s)
s='-Between-'.join(l)
print(s)Output -
['Hello', 'String']
HelloString
Hello-String
Hello-Between-StringIn this program for conversing the list to the string , we use join to combine the all items in a list and add them and create a string and in join() we can also add our string which we want to add like -.join(list).