Python Convert List to String

In this post, we will see how to convert a list to String in Python.

You can simply use string’s join method to convert a list to String in Python.


String’s join method

string’s join method return string in which element of the sequence is joined by separator.

Let’s see some examples.


Join all the strings in list without any separator

Output:

‘abcde’

Join all strings in list with space

Output:

‘Hello world from java2blog’

Join all the strings in list with comma

Output:

HIndia,China,Nepal,France

Convert list of ints to string in python

If you have list of ints, you can convert each item to string using map function.

Output:

1234

That’s all about Python convert list to String.

Was this post helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *