There are several methods to convert
list into string by using python. Today we will discuss, how to convert a
list into a string in Python by using join() method. Lets read
together.
In Python programming language, the join() method is a string method that is used to concatenate (combine) the elements of an iterable (like a list or tuple) into a single string. It inserts a specified separator between the elements as it joins them together.
How to Convert List into String by using Python
Syntax:
separator.join(iterable)
Example:
words = ['Python','programming','language', 'is', 'fun.']
sentence = ' '.join(words)
print(sentence)
Output:
sentence = ' '.join(words)
print(sentence)
Output:
Python programming langauge is fun.
