 <p>The best way to do this is my using the <code>set()</code> function like this:</p> <pre><code>x=['a','b','a','b','c','d'] print list(set(x)) </code></pre> <p>As the <code>set()</code> function returns an unordered result. Using the <code>sorted()</code> function, this problem can be solved like so:</p> <pre><code>x=['a','b','a','b','c','d'] print list(sorted(set(x))) </code></pre>