title: Any reason not to use '+' to concatenate two strings?
body: <p>A common antipattern in Python is to concatenate a sequence of strings using <code>+</code> in a loop. This is bad because the Python interpreter has to create a new string object for each iteration, and it ends up taking quadratic time. (Recent versions of CPython can apparently optimize this in some cases, but other implementations can't, so programmers are discouraged from relying on this.) <code>''.join</code> is the right way to do this.</p>
  
  <p>However, I've heard it said (<a href="https://stackoverflow.com/questions/10001301/list-slicing-python/10001401#10001401">including here on Stack Overflow</a>) that you should <em>never, ever</em> use <code>+</code> for string concatenation, but instead always use <code>''.join</code> or a format string. I don't understand why this is the case if you're only concatenating two strings. If my understanding is correct, it shouldn't take quadratic time, and I think <code>a + b</code> is cleaner and more readable than either <code>''.join((a, b))</code> or <code>'%s%s' % (a, b)</code>.</p>
  
  <p>Is it good practice to use <code>+</code> to concatenate two strings? Or is there a problem I'm not aware of?</p>