title: Pythonic way to determine if two given numbers are adjacent in integer sequence
body: <p>Given integers a, b such that a &lt; b; and some ordered iterable sequence of integers, <code>seq</code>.  Determine whether <code>a</code> and <code>b</code> appear adjacent, in that order, anywhere in <code>seq</code></p>
  
  <p>The obvious first pass is :</p>
  
  <p>assume
  a &lt; b (if a > b, just switch values).</p>
  
  <pre><code>&gt;&gt;&gt; idx = 0
  &gt;&gt;&gt; for i in range(0, len(l)):
  ...     if a == l[i]:
  ...             idx = i
  ... 
  &gt;&gt;&gt; b == l[idx+1]
  </code></pre>
  
  <p>This feels clumsy.</p>
  
  <p>For example, given </p>
  
  <pre><code>&gt;&gt;&gt; [1, 2, 3, 8]
  </code></pre>
  
  <p>If a is 1 and b is 3, they are not adjacent, if a is 3 in b is 8, they are.</p>
  
  <p>Something tells me there is a more pythonic way of doing this or that this is a well explored problem, and I am missing a clearer/cleaner way to approach it.</p>