title: Increment first n list elements given a condition
body: <p>I have a list for example</p>
  
  <pre><code>l = [10, 20, 30, 40, 50, 60]
  </code></pre>
  
  <p>I need to increment the first <code>n</code> elements of the list given a condition. The condition is independent of the list. For example if <code>n = 3</code>, the list <code>l</code> should become : </p>
  
  <pre><code>l = [11, 21, 31, 40, 50, 60]
  </code></pre>
  
  <p>I understand that I can do it with a <code>for</code> loop on each element of the list. But I need to do such operation around 150 million times. So, I am looking for a faster method to do this.  Any help is highly appreciated. Thanks in advance</p>