title: List pattern Check
body: <p>I want to solve one Issue related to List Pattern.
  I have on one pattern list, <strong>pattern=['A', 'B']</strong> and one Actual list, <strong>Actual =['A','B','A','B',A']</strong>,I need to check that** Actual list** element following the pattern of <strong>pattern</strong> list or not</p>
  <p>Condition1:</p>
  <pre><code>let say if Actual=['A','B','A','B','A']
  and pattern=['A','B']
  if this condition then i will receive in print **yes Actual list follow the pattern of pattern list**
  But if Actual==['A','B','A','B','B']
  then return **not matching with the pattern of pattern list and Capture the not matching postion and not matching Element of Actual list**.
  
  Similarly for the other repetition of pattern like in condition 2.
  
  Condition 2:
  Actual=['X','Y','Z',X','Y']
  pattern=['X','Y','Z']
  if this condition then i will receive in print **yes Actual list follow the pattern of pattern list**.
  
  but if Actual=['X','Y','Z','Y','Z']
  pattern=['X','Y','Z']
  if this the then return **not matching with the pattern of pattern list and Capture the not matching postion and not matching Element of Actual list**.
  
  and many more like this.
  
  </code></pre>
  <p>i have tried using :</p>
  <pre><code>if Actual==pattern*int(len(Actual)/(len(Pattern))
      return True
  else:
      #Capturing the misplace postion in the Actual list.
  </code></pre>
  <p>but Above one is only working when the both length of Actual list is a divisor of the pattern.</p>
  <p>Can anyone suggest me any other Approach?</p>
  <p>Note: length of Pattern list may vary.it not always 2 as like in the Above case.</p>