title: Mutable and Immutable Strings in python
body: <p>I was just going through mutable and immutable structures in python.
  It was written that "Strings are immutable" in Python i.e We cannot alter them
  Consider the code:</p>
  
  <pre><code>str1='Rohit'
  str1.replace('R','M')
  </code></pre>
  
  <p>This gives the output:</p>
  
  <pre><code>'Mohit'
  </code></pre>
  
  <p>Now, somebody said that it is the variable str1 which is pointing to the string 'Rohit' and after str1.replace() it points to 'Mohit'
  Consider this code:</p>
  
  <pre><code>'Rohit'.replace('R','M')
  </code></pre>
  
  <p>This also gives me the output:</p>
  
  <pre><code>'Mohit'
  </code></pre>
  
  <p>Then what is meant by 'Strings are immutable'?</p>