title: What is the problem with the replace function?
body: <p>The assignment is just to convert :) to  and :(  to  and I have to implement two functions convert and main. I don't understand the problem with &quot;.replace&quot; it gets never coloured.</p>
  <pre><code>def convert(str):
      str = str.replace(&quot;:)&quot;,&quot;&quot;)
      str = str.replace(&quot;:(&quot;,&quot;&quot;)
     
  def main():
      str = input(&quot;write something: &quot;)
      convert(str)
      print(str)
  
  if __name__ == &quot;__main__&quot;:
      main()
  </code></pre>