3 ms·
Modern Python is usually smart enough to optimize: s += "..." Though I'm not sure if it similarly optimizes: s = s + "..." But old habits die hard so I
by js2 13y ago
Modern Python is usually smart enough to optimize:
s += "..."
Though I'm not sure if it similarly optimizes:
s = s + "..."
But old habits die hard so I still use a list of strings and join them at the end.