Because it's a method of the str class, it can also be written: buf = str.join('', ('foo' for i in range(50000)) ) print(buf) You just have to pass the string to join on as the first argument, because ...
Python wouldn't be python with that kind of compromise on ability to reason about a core type. I gree with thumperward: I'd rather string addition buf += 'foo' had been disallowed and string ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results