title: python, given 2 lists, take off the same middle part then added rest 2 lists
body: <p>In python, need to define a function that takes 2 lists. If the last part of the first list is same as first part of the second list, then delete the same part and added rest 2 lists together. such as:</p>
  
  <p>I have defined a helper function called prefix that takes 2 lists and return true if the first list is prefix of the second list. Otherwise return false.</p>