3 ms·
If you really care about efficiency (and are using PyPy), an actually efficient way to concat strings: from __pypy__.builders import StringBuilder buil
by kingkilr 13y ago
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()