title: Pythonic way of comparing all adjacent elements in a list
body: <p>I want to know if there's a more Pythonic way of doing the following:</p>
  
  <pre><code>A = some list
  i = 0
  j = 1
  for _ in range(1, len(A)):
      #some operation between A[i] and A[j]
      i += 1
      j += 1
  </code></pre>
  
  <p>I feel like this should/could be done differently. Ideas?</p>
  
  <p>EDIT:
  Since some are asking for requirements. I wanted a <strong>general-purpose</strong> answer. Maybe to check if A[i], A[j] are between a certain range, or if they're equal. Or maybe I wanted to do a "trickle-up" of elements. The more general, the better. </p>