title: How to find Intersection and Union of a List (without using sets)
body: <p>I am trying to find the intersection and union of two lists for an assignment, however, <strong>I cannot use sets</strong>. From set theory, an intersection between two sets is the elements that are in both sets. A union is all elements in both sets, without repetition. So far I have:</p>
  
  <pre><code>setA = [1,2,3,4,5,6,7,8,9]
  setB = [1,5,0,9]
  
  def getUnion(a, b):
      return a + b
  
  def getIntersection(a, b):
      return 
  </code></pre>
  
  <p>My union function is returning duplicates. Is there a way to simply find the union?</p>
  
  <p>Also, what is the best approach to find the intersection?</p>