What is the cleanest way to do a sort plus uniq on a Python list?
<p>Consider a Python list <code>my_list</code> containing <code>['foo', 'foo', 'bar']</code>.</p>

<p>What is the most Pythonic way to uniqify:ing and sorting and the list (think <code>cat my_list | sort | uniq</code>)?</p>

<p>This is how I currently do it and while it works I'm sure there are better ways to do it.</p>

<pre><code>my_list = []
...
my_list.append("foo")
my_list.append("foo")
my_list.append("bar")
...
my_list = set(my_list)
my_list = list(my_list)
my_list.sort()
</code></pre>
