title: How to repeat only a certain element in a list?
body: <p>Assuming a list as follows:</p>
  
  <pre><code>article = ['a', 'b', 'c', 'd']
  </code></pre>
  
  <p>and a variable named <code>times</code></p>
  
  <p>Now, based on the value of the variable <code>times</code>, I want to repeat just the element <code>'a'</code> in the <code>article</code> list that many times.</p>
  
  <p><strong>For example:</strong></p>
  
  <p>If <code>times = 2</code>, </p>
  
  <p>the <strong>desired output</strong> is </p>
  
  <pre><code>article = ['a', 'a', 'b', 'c', 'd']
  </code></pre>
  
  <p>Similarly, if <code>times = 3</code>, </p>
  
  <p>the <strong>desired output</strong> is </p>
  
  <pre><code>article = ['a', 'a', 'a', 'b', 'c', 'd']
  </code></pre>
  
  <p>I tried doing:</p>
  
  <pre><code>[['a']*times, 'b', 'c', 'd']
  </code></pre>
  
  <p>But it gives me a list within a list as follows:</p>
  
  <pre><code>[['a', 'a'], 'b', 'c', 'd']
  </code></pre>
  
  <p>How can this be done?</p>