title: Replace a substring in a string with null in python
body: <p>I have a string as</p>
  
  <pre><code>a='''123
  456
  789'''
  </code></pre>
  
  <p>I want to replace 456 with something similar to a null value, so that the corresponding output is</p>
  
  <pre><code>123
  789
  </code></pre>
  
  <p>The objective is to eliminate the empty line that would be generated as a result of </p>
  
  <pre><code>a=a.replace('456','')
  </code></pre>