title: Keep one of two consecutive chars in a string
body: <p>So I want to replicate a word <code>n</code> times in my function but I want to eliminate the consecutive characters.</p>
  <p>For example <code>repete (amanha, 2) = &quot;amanhamanha&quot;</code></p>
  <p>My function:</p>
  <pre><code>def repete(palavra,n):
      
      a = []
      b=&quot;&quot;
      
      for n in range (0,n): 
          a.append(palavra)
  
      b = b.join(a)   
  
      return b
  </code></pre>