I expected the following two tuples
>>> x = tuple(set([1, \"a\", \"b\", \"c\", \"z\", \"f\"]))
>>> y = tuple(set([\"a\", \"b\", \"c\", \"z\", \
so you have two lists - which have the same content but in different orders, you convert them into sets - which will be equal, as they have the same content.
When you convert those sets into tuples, they will be converted in the same order, as they are the same set, so the tuples will be the same.
This is true in Python2.7 - but from 3.3 onwards when hashes are randomised you will not be able to guarantee this - as the two sets, although equal in content wont neccessarily iterate in the same order.