String concatenation

Jonas Galvez jg at jonasgalvez.com
Fri Jun 18 19:40:39 EDT 2004


Is it true that joining the string elements of a list is faster than
concatenating them via the '+' operator?

"".join(['a', 'b', 'c'])

vs

'a'+'b'+'c'

If so, can anyone explain why?



\\ jonas galvez
// jonasgalvez.com








More information about the Python-list mailing list