mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Forward-port r67624 and r67627.
This commit is contained in:
parent
c7d2b21cec
commit
2080ea5f4b
2 changed files with 1 additions and 8 deletions
|
@ -376,7 +376,7 @@ Here is a brief demonstration::
|
|||
|
||||
>>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}
|
||||
>>> print(basket)
|
||||
{'orange', 'bananna', 'pear', 'apple'}
|
||||
{'orange', 'banana', 'pear', 'apple'}
|
||||
>>> fruit = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
|
||||
>>> fruit = set(basket) # create a set without duplicates
|
||||
>>> fruit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue