title: eliminate duplicate anagram in a list
body: <pre><code>s = ['4', 'poke', 'aaagmnrs', 'pkoe', 'okpe', 'ekop', 'anagrams']
  
  final_list = []
  
  for i in range(0, len(s)):
      for j in range(i+1, len(s)):
          if sorted(s[i]) == sorted(s[j]):
              if s[i] not in final_list:
                  final_list.append(s[i])
  
  print(final_list)
  </code></pre>
  
  <p>I am getting this output</p>
  
  <pre><code>['poke', 'aaagmnrs', 'pkoe', 'okpe']
  </code></pre>
  
  <p>I need this output</p>
  
  <pre><code>['poke', 'aaagmnrs']
  </code></pre>
  
  <p>If there are multiple items in a list that are anagrams of earlier item in a list, I basically need only the first occurence. For example 'poke' occurs before 'pkoe', 'okpe' and 'ekop' i need only 'poke' in the output list. Same with 'aaagmnrs'. Since 'aaagmnrs' occurs before 'anagrams' i need only 'aaagmnrs' in the output.</p>