[issue4570] Bad example in set tutorial

John Marter report at bugs.python.org
Sun Jan 24 23:04:38 CET 2010


John Marter <jmarter at gmail.com> added the comment:

I see that the spelling of banana has been fixed but what is the purpose of assigning fruit and then immediately reassigning it another value without even looking at the first assignment?

>>> fruit = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
>>> fruit = set(basket)               # create a set without duplicates

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4570>
_______________________________________


More information about the Python-bugs-list mailing list