title: remove adjacent list elements based on condition?
body: <p>i want remove right hand side value if difference between adjacent elements is less than 0.20, so I am doing this</p>
  <pre><code>a  = [183.4, 183.3 182.1, 182.75]
  a  = [183.4, 182.1, 182.75] # what I want
  
  
  for i, j in zip(a, a[1:]):
      if abs(i-j) &lt;= 0.20:
          a.remove(j)
  print(a) 
  </code></pre>
  <p>but the output is</p>
  <pre><code>[183.4, 182.75]
  
  </code></pre>