DEV Community

Discussion on: How to convert list to string python?

hanpari profile image
Pavel Morava

Using + operator for concating strings is not recommended because it is slow. Python creates new string each time he concat two strings while the join method does it at once.

A terse way how to join a chain of strings is to use the built-in sum which is consider hackish and slow for the reasons stated above.