A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-April/088467.html below:

[Python-Dev] slightly inconsistent set/list pop behaviour

[Python-Dev] slightly inconsistent set/list pop behaviourRaymond Hettinger python at rcn.com
Wed Apr 8 07:47:45 CEST 2009
[Tennessee Leeuwenburg ]
> Now, I know that sets aren't ordered, but...
>
> foo = set([1,2,3,4,5])
> bar = [1,2,3,4,5]
>
> foo.pop() will reliably return 1 
> while bar.pop() will return 5
>
> discuss :)

If that's what you need:
    http://code.activestate.com/recipes/576694/


Raymond
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4