title: python string syntax error += operator
body: <p>I get a syntax error in Python 2.7.3 like so:</p>
  
  <pre><code>[s += 'Orig' for s in strs]
    File "&lt;stdin&gt;", line 1
      [s += 'Orig' for s in strs]
          ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>where strs is just a list of strings, like <code>['a', 'b', 'c', 'd']</code></p>
  
  <p>if I change the code to:</p>
  
  <pre><code>[s + 'Orig' for s in strs]
  </code></pre>
  
  <p>Then it works:</p>
  
  <pre><code>['aOrig', 'bOrig', 'cOrig', 'dOrig']
  </code></pre>
  
  <p>What's the reason behind this? Is it because the s in the list comprehension is not mutable? But it should be a temporary object that is discarded later anyway, so why not?</p>
  
  <p>Also, what is the most efficient way to do what I want to do? I looked at another link: <a href="http://www.skymind.com/~ocrow/python_string/" rel="nofollow">http://www.skymind.com/~ocrow/python_string/</a> and tried to use join, but join does not do what I want; it joins a list of strings into a single string, whereas I want to append a string to a list of strings.</p>