title: Str replace method happening inplace
body: <p>I have a Python string which I want to <code>\include</code> in a latex file. However, my string has an underscore character (<code>_</code>), which needs to be converted into <code>\_</code> (this is latex representation for _) before included.</p>
  
  <p>If I do:   </p>
  
  <pre><code>self.name = self.laser_comboBox.currentText() #Get name from a qt widget
  latex_name = self.name.replace("_", r"\_") #Replacing _ for \_
  print self.name
  print latex_name
  </code></pre>
  
  <p>I'll get:</p>
  
  <pre><code>XXXXXX-YY\_SN2017060009
  XXXXXX-YY\_SN2017060009
  </code></pre>
  
  <p>As, it can be seen, both variables got replaced. This means that the <code>replace</code> method happened inplace. However if I do:</p>
  
  <pre><code>self.name = self.laser_comboBox.currentText() #Get name from a qt widget
  latex_name = str(self.name).replace("_", r"\_") #Converting to str and then replacing _ for \_
  print self.name
  print latex_name
  </code></pre>
  
  <p>I'll get:</p>
  
  <pre><code>XXXXXX-YY_SN2017060009
  XXXXXX-YY\_SN2017060009
  </code></pre>
  
  <p>This is something that puzzled me..I'd like to know why this is happening...</p>