title: Comparing two lists item by item
body: <p>I have 2 lists and I want to compare these lists item-by-item.
  For example:  </p>
  
  <pre><code>a = [1,2,3]
  b = [2,3,1]
  for i in a:
      if i in b:
          pass # do something
      else:
          pass # do something else instead
  </code></pre>
  
  <p>I find this implementation a bit trivial.</p>
  
  <p>I would like to know other ways of efficiently achieving the task.<br>
  (Efficiency implies either time complexity or space complexity)</p>