title: How to get the index of a list items in another list?
body: <p>Consider I have these lists:</p>
  
  <pre><code>l = [5,6,7,8,9,10,5,15,20]
  m = [10,5]
  </code></pre>
  
  <p>I want to get the index of <code>m</code> in <code>l</code>. I used list comprehension to do that:</p>
  
  <pre><code>[(i,i+1) for i,j in enumerate(l) if m[0] == l[i] and m[1] == l[i+1]]
  </code></pre>
  
  <p>Output : <code>[(5,6)]</code></p>
  
  <p>But if I have more numbers in <code>m</code>, I feel its not the right way. So is there any easy approach in Python or with NumPy? </p>
  
  <p>Another example:</p>
  
  <pre><code>l = [5,6,7,8,9,10,5,15,20,50,16,18]
  m = [10,5,15,20]
  </code></pre>
  
  <p>The output should be: </p>
  
  <pre><code>[(5,6,7,8)]
  </code></pre>