title: Looking for Italicized Text In Python using re.sub
body: <p>the gist of this is, i'm making a function that removes italicized text by using re.sub and duplicate the text. The function has an argument named sentence that contains a string.</p>
  
  <p>A few examples:</p>
  
  <pre><code>sentence = &lt;i&gt;All of this text is italicized.&lt;/i&gt;
  Return value = "All of this text is italicized. All of this text is italicized."
  
  sentence = &lt;i&gt;beep&lt;/i&gt;&lt;i&gt;bop&lt;/i&gt;&lt;i&gt;boop&lt;/i&gt;&lt;i&gt;bonk&lt;/i&gt;
  Return value: "beep beepbop bopboop boopbonk bonk"
  
  sentence = "I &lt;i&gt;Like&lt;/i&gt;, food because &lt;i&gt;it's so great&lt;/i&gt;!"
  return value: "I Like Like food because it's so great it's so great!".
  </code></pre>
  
  <p>Here's what i have so far:</p>
  
  <pre><code>pattern = r'&lt;.*?&gt;'
  return re.sub(pattern, i, sentence)
  </code></pre>
  
  <p>Anyone can help?</p>