Ordering python sets
__peter__ at web.de
Wed Oct 22 15:37:03 CEST 2008
Tim Chase wrote:
> Though for each test, in 2.3, 2.4, and 2.5 that I've got
> installed on my local machine, they each printed "s" in-order,
> and the iteration occurred in-order as well, even without the
> added "sorted(list(s))" code.
You need more tests then ;)
By the way, sorted(s) is sufficient; sorted() accepts arbitrary iterables.
More information about the Python-list