title: Replace character in a string conditional on appearance of another character in the string Python
body: <p>I have a string in my code (which consists entirely of lower-case alphabets). I need to replace a character conditional on the appearance of another character after the character I intend to replace in the same string. For example if the character to be replaced is "e" and the conditional character is "t", then we will replace "e" in "forest" but not in "jungle"
  Is there is way to do this in a simple manner in Python? Thanks for taking out time for this problem.</p>
  
  <p>P.S Please note that there is no repetition of alphabets in the characters I am working with.</p>