title: Asymptotic complexity of converting list to set in Python
body: <p>There's already a <a href="https://stackoverflow.com/questions/27824901/python-converting-a-list-to-set-big-o">question</a> regarding this, and the answer says that the asymptotic complexity is O(n). But I observed that if an unsorted list is converted into a set, the set can be printed out in a sorted order, which means that at some point in the middle of these operations the list has been sorted. Then, as any comparison sort has the lower bound of Omega(n lg n), the asymptotic complexity of this operation should also be Omega(n lg n). So what exactly is the complexity of this operation?</p>