title: How to check if first list appear in the same order somewhere in the second list
body: <p>Write a function called sublist. The function takes 2 lists as parameters, and returns True if the items in the first list appear in the same order somewhere in the second list (and False if they don't)</p>
  
  <p>Here are some examples:</p>
  
  <pre><code>&gt;&gt;&gt; sublist([2, 3], [1, 2, 3, 4, 5]) True
  &gt;&gt;&gt; sublist([1, 3], [1, 2, 3, 4, 5]) False
  &gt;&gt;&gt; sublist([1, 2, 3], [1, 2, 1, 2, 3, 4]) True 
  </code></pre>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>def sublist(list1,list2):
      for i in range(len(list2)):
          if list2[i] != list1[i]:
              return False
          return True
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>&gt;&gt;&gt; sublist([2,3],[1,2,3,4,5])
  False
  &gt;&gt;&gt; sublist([1,3],[1,2,3,4,5])
  True
  &gt;&gt;&gt; sublist([1,2,3],[1,2,1,2,3,4])
  True
  </code></pre>
  
  <p>I know that's not entirely right and I know I'm going to have to use [  :  ] to extract a portion of a string or a list but I have no idea where to start. Any help would be great, thank you.</p>