title: How can I add nothing to the list in list comprehension?
body: <p>I am writing a list comprehension in Python:</p>
  
  <pre><code>[2 * x if x &gt; 2 else add_nothing_to_list for x in some_list]
  </code></pre>
  
  <p>I need the "add_nothing_to_list" part (the else part of the logic) to literally be nothing.</p>
  
  <p>Does Python have a way to do this? In particular, is there a way to say <code>a.append(nothing)</code> which would leave <code>a</code> unchanged. This can be a useful feature to write generalized code.</p>