title: Find sub list inside a list in python
body: <p>I have a list of numbers </p>
  
  <pre><code>l = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  [0, 0, 0, 0, 0, 1, 0, 0, 0, 0]
  [0, 0, 2, 1, 1, 2, 0, 0, 0, 0]
  [0, 0, 2, 1, 1, 2, 2, 0, 0, 1]
  [0, 0, 1, 2, 2, 0, 1, 0, 0, 2]
  [1, 0, 1, 1, 1, 2, 1, 0, 2, 1]]
  </code></pre>
  
  <p>For example , i have to search a pattern '2,1,1,2' , as we can see that is present in row 6 and 7 . 
  in order to find that sequence i tried converting each list into str and tried to search the pattern , but for some reason the code isnt working. </p>
  
  <pre><code>import re
  for i in l:
   if re.search('2,1,1,2' , str(i).strip('[').strip(']')): print " pattern found"
  </code></pre>
  
  <p>am i missing something in here ? </p>