String concatenations in Python

Here is an excellent page that compares the efficiencies of various methods for String concatenation in Python.  The author uses long lists of integers as the strings to combine, which provides an interesting test case.

The fastest method (according to the article) is:

def method6():
     return ''.join([`num` for num in xrange(loop_count)])

The article also lists the following, more common approach:

def method4():
    str_list = []
    for num in xrange(loop_count):
        str_list.append(`num`)

    return ''.join(str_list)

If I can find the spare time, I would really like to delve deeper in to the underlying reasons why the method6() is faster than the method 4().  In the meantime, I’ll continue to kick myself each time I throw a “+=” operator between two strings.