title: understanding "item for item in list_a if ..." PYTHON
body: <p>I've seen the following code many times, and I know it's the solution to my problems, but I'm really struggling to understand HOW it works. The code in particular is:</p>
  
  <pre><code>item for item in list_a if item not in list_b.
  </code></pre>
  
  <p>For example, with <code>for each in list</code>, I can understand that it is going through the list, and doing a loop for each item in that list. with <code>while x &lt; 10</code> is easy to comprehend, and most other loops and similar commands are pretty straightforward. Even the <code>for item in list_a if item not in list_b</code> makes sense to me, though that alone doesn't seem to work without that first <code>item</code>...But for some reason, I just don't understand how that first <code>item</code> fits into the equation, other than "because" (which just isn't a helpful answer), what it represents.</p>
  
  <p>Would someone be able to help me sort this out, or be able to expand this equation out into several equations that might help me wrap my head around how it's working. it's so much easier for me to use these tools when I understand how they work, and this ones baffled me for a while.</p>
  
  <p>Thanks in advance.</p>