filter out "reversed" duplicated tuples from a list in Python
<p>I've a list like this:</p>

<pre><code>[('192.168.1.100', '192.168.1.101', 'A'), ('192.168.1.101', '192.168.1.100', 'A'), 
 ('192.168.1.103', '192.168.1.101', 'B'), ('192.168.1.104', '192.168.1.100', 'C')]
</code></pre>

<p>And with many more similar tuples, here the two first items are just the IP addresses in the opposite order.</p>

<p>Now, I need to create a new list which is unique on the combination
of the 2 first IP addresses in each tuple.</p>

<p>That is, for my purpose <code>('192.168.1.100', '192.168.1.101', 'A')</code> is the same as <code>('192.168.1.101', '192.168.1.100', 'A')</code> , it doesn't matter which of those 2 I end up with. Though none of those would be the same as <code>('192.168.1.101', '192.168.1.100', 'B')</code></p>

<p>Given the list at the start, I need to end up with a new list:</p>

<pre><code>    [('192.168.1.101', '192.168.1.100', 'A'), ('192.168.1.103', '192.168.1.101', 'B'), 
     ('192.168.1.104', '192.168.1.100', 'A')]
</code></pre>

<p>What's an elegant way of doing this in python ?</p>
