title: Conditionally add items to a list when defining the list?
body: <p>Is there a way to add items to a list conditionally, when defining the list?
  Here's what I mean:</p>
  
  <pre><code>l = [
      Obj(1),
      Obj(2),
      Separator() if USE_SEPARATORS,
      Obj(3),
      Obj(4),
      Obj(5),
      Separator() if USE_SEPARATORS,
      Obj(6)
  ]
  </code></pre>
  
  <p>Obviously the above code doesn't work, but is there a similar way?</p>
  
  <p>Currently I have</p>
  
  <pre><code>l = [item for item in (
          Obj(1),
          Obj(2),
          Separator() if USE_SEPARATORS,
          Obj(3),
          Obj(4),
          Obj(5),
          Separator() if USE_SEPARATORS,
          Obj(6)
  ) if not isinstance(item, Separator) or USE_SEPARATORS]
  </code></pre>
  
  <p>But I was wondering if there's an other way that wouldn't required looping through the list, since they can be 10 000 items long and the server stops for a quarter second or so when I execute the code.
  It's for a first-person shooter game, so quarter second might actually have an effect on someone dying or living.</p>