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 l0nwlf
Recipients autometa, flox, georg.brandl, jmarter, l0nwlf, rhettinger
Date 2010-04-07.02:50:42
SpamBayes Score 8.1633516e-08
Marked as misclassified No
Message-id <1270608644.21.0.146307537478.issue4570@psf.upfronthosting.co.za>
In-reply-to
Content
I guess giving fruit, the set of unique fruit a different name makes it more clear. Comments alignment fixed.

>>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}
>>> print(basket)
{'orange', 'bananna', 'pear', 'apple'}
>>> fruit = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
>>> uniquefruit = set(fruit)               # create a set without duplicates
>>> uniquefruit
{'orange', 'pear', 'apple', 'banana'}
History
Date User Action Args
2010-04-07 02:50:44l0nwlfsetrecipients: + l0nwlf, georg.brandl, rhettinger, jmarter, flox, autometa
2010-04-07 02:50:44l0nwlfsetmessageid: <1270608644.21.0.146307537478.issue4570@psf.upfronthosting.co.za>
2010-04-07 02:50:42l0nwlflinkissue4570 messages
2010-04-07 02:50:42l0nwlfcreate