title: Check whether a list starts with the elements of another list
body: <p>What is the easiest (most pythonic way) to check, if the beginning of the list are exactly the elements of another list? Consider the following examples:</p>
  
  <pre><code>li = [1,4,5,3,2,8]
  
  #Should return true
  startsWithSublist(li, [1,4,5])
  
  #Should return false
  startsWithSublist(list2, [1,4,3])
  
  #Should also return false, although it is contained in the list
  startsWithSublist(list2, [4,5,3])
  </code></pre>
  
  <p>Sure I could iterate over the lists, but I guess there is an easier way. Both list will never contain the same elements twice, and the second list will always be shorter or equal long to the first list. Length of the list to match is variable.</p>
  
  <p>How to do this in Python?</p>