title: Extract unique elements from a list returned by BeautifulSoup
body: <p>I have countries list scraped from <a href="http://www.wotif.com/" rel="nofollow">this</a> website having values like</p>
  
  <p>(Note: this is the output of <code>all_countries</code> after iterating its elements)</p>
  
  <pre><code>&lt;a  data-flexible="" SELECT data-id="AU" href="http://www.wotif.com/AU"&gt;Australia&lt;/a&gt;
  &lt;a  data-flexible="" data-id="NZ" href="http://www.wotif.com/NZ"&gt;New Zealand&lt;/a&gt;
  &lt;a  data-flexible="" data-id="ID" href="http://www.wotif.com/ID"&gt;Indonesia&lt;/a&gt;
  &lt;a  data-flexible="" data-id="TH" href="http://www.wotif.com/TH"&gt;Thailand&lt;/a&gt;
  &lt;a  data-flexible="" data-id="SG" href="http://www.wotif.com/SG"&gt;Singapore&lt;/a&gt;
  &lt;a  data-flexible="" data-id="GB" href="http://www.wotif.com/GB"&gt;United Kingdom&lt;/a&gt;
  &lt;a  data-flexible="" data-id="TH" href="http://www.wotif.com/TH"&gt;Thailand&lt;/a&gt;
  &lt;a  data-flexible="" data-id="AU" href="http://www.wotif.com/AU"&gt;Australia&lt;/a&gt;
  &lt;a  data-flexible="" data-id="AR" href="http://www.wotif.com/AR"&gt;Argentina&lt;/a&gt;
  &lt;a  data-flexible="" data-id="NZ" href="http://www.wotif.com/NZ"&gt;New Zealand&lt;/a&gt;
  </code></pre>
  
  <p>What I want to do is that get the only unique countries</p>
  
  <p>This is what I have tried.</p>
  
  <pre><code>all_countries = countries.select('div#country-box ul li a')
  
  for index,value in enumerate(all_countries):
      print(value)
      all_countries[index] = value.text
  
  all_countries = set(all_countries)
  all_countries = list(all_countries)
  
  for index,value in enumerate(all_countries):
      print(value)
  </code></pre>
  
  <p>Hmmm okay, I have now unique elements but it does not maintain Order of those countries as they appear on site in that MultiSelectList and I also need values of attributes <code>data-id</code> and <code>href</code> and also the text of <code>a</code> tag for later use in my script.</p>
  
  <p>If I do </p>
  
  <pre><code>all_countries = countries.select('div#country-box ul li a')
  all_countries = set(all_countries)
  
  all_countries = list(all_countries)
  </code></pre>
  
  <p>Would it be a good approach?</p>