>Chris Torek <nos...@torek.net> wrote:
>>     >>> x = [3, 1, 4, 1, 5, 9, 2, 6]
>>     >>> list(set(x))
>> This might not be the best example since the result is sorted
>> "by accident", while other list(set(...)) results are not. 

In article <Xns9EE772D313153duncanbooth@127.0.0.1>,
Duncan Booth  <duncan.bo...@suttoncourtenay.org.uk> wrote:
>A minor change to your example makes it out of order even for integers:
>
>>>> x = [7, 8, 9, 1, 4, 1]
>>>> list(set(x))
>[8, 9, 1, 4, 7]
>
>or for that mattter:
>
>>>> list(set([3, 32, 4, 32, 5, 9, 2, 6]))
>[32, 2, 3, 4, 5, 6, 9]

Yes, but then it is no longer "as easy as pi". :-)
-- 
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (40°39.22'N, 111°50.29'W)  +1 801 277 2603
email: gmail (figure it out)      http://web.torek.net/torek/index.html
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to