News for hackers. Stuff that matters.
Re:Efficient String Concatenation in Python by kingkilr on Saturday September 07, 2013 @05:59PM (#6346792)
If you really care about efficiency (and are using PyPy), an actually efficient way to concat strings:

    from __pypy__.builders import StringBuilder
    builder = StringBuilder(<size estimate, optional>)
    for i in xrange(10000):
        builder.append(str(i))
    return builder.build()

There are no comments on this comment yet.