Search and Replace a word within a word in Python. Replace() method not working : <p>How do I search and replace using built-in Python methods?</p>

<p>For instance, with a string of appleorangegrapes (yes all of them joined),
Replace "apple" with "mango".</p>

<p>The .replace method only works if the words are evenly spaced out but not if they are combined as one. Is there a way around this?</p>

<p>I searched the web but again the .replace method only gives me an example if they are spaced out.</p>

<p>Thank you for looking at the problem!</p>
