title: Python list comprehension - simple
body: <p>I have a list and I want to use a certain function only on those entries of it that fulfills a certain condition - leaving the other entries unmodified.</p>
  
  <p>Example: Say I want to multiply by 2 only those elements who are even.</p>
  
  <pre><code>a_list = [1, 2, 3, 4, 5]
  </code></pre>
  
  <p>Wanted result: </p>
  
  <pre><code>a_list =&gt; [1, 4, 3, 8, 5]
  </code></pre>
  
  <p>But <code>[elem * 2 for elem in a_list if elem %2 == 0]</code> yields <code>[4, 8]</code> (it acted as a filter in addition).</p>
  
  <p>What is the correct way to go about it?</p>