This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mirwi
Recipients docs@python, mirwi
Date 2020-02-21.09:24:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582277071.44.0.766763125418.issue39705@roundup.psfhosted.org>
In-reply-to
Content
>>> basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
>>> for f in sorted(set(basket)):
...     print(f)
...
apple
banana
orange
pear

Shouldn't 'apple' appear two times as basket is a list that allows duplicates, not a set?

I'm just doing my first steps into Python and may be mislead. In that case, sorry for the fuzz.
History
Date User Action Args
2020-02-21 09:24:31mirwisetrecipients: + mirwi, docs@python
2020-02-21 09:24:31mirwisetmessageid: <1582277071.44.0.766763125418.issue39705@roundup.psfhosted.org>
2020-02-21 09:24:31mirwilinkissue39705 messages
2020-02-21 09:24:31mirwicreate