title: If statement in list comprehension with multiple lists
body: <p>I have two lists of equal length &amp; want to remove values from both if their difference is less than 5:</p>
  
  <pre><code>X_List = [0, 95, 99, 107, 589]
  Y_List = [94, 98, 104, 587, 1046]
  </code></pre>
  
  <p>I want to remove e.g. the second &amp; third values from each using list comprehension:</p>
  
  <pre><code>X_list = [x if y-x &lt;= 5 for (x,y) in zip(X_list, Y_List)]
  Y_list = [y if y-x &lt;= 5 for (x,y) in zip(X_list, Y_List)]
  </code></pre>
  
  <p>however there is an error (invalid syntax) on the 'for' part of each line. Is this due to the first y &amp; how would I prevent this?</p>