title: Remove all duplicate elements in a list
body: <p>I have a list (ex: <code>[1, 2, 2, 3, 4, 3]</code>) and I need to only keep the first occurrence of any of the elements in the list (ex: the list should become <code>[1, 2 ,3, 4]</code>). I know that I could do something like this:<br/></p>
  
  <pre><code>badList = [1, 2, 2, 3, 4, 3]
  goodList = []
  for element in badList:
      if element in goodList:
          continue
      goodList.append(element)
  print (goodList)
  </code></pre>
  
  <p>However, this is a very messy solution, and I am hoping there is a more elegant way.</p>