mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Remove redundant example.
This commit is contained in:
parent
fd0eb3fdf7
commit
471ed00ae9
1 changed files with 1 additions and 4 deletions
|
@ -377,10 +377,7 @@ empty dictionary, a data structure that we discuss in the next section.
|
|||
|
||||
Here is a brief demonstration::
|
||||
|
||||
>>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}
|
||||
>>> print(basket)
|
||||
{'orange', 'banana', 'pear', 'apple'}
|
||||
>>> fruit = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
|
||||
>>> basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
|
||||
>>> fruit = set(basket) # create a set without duplicates
|
||||
>>> fruit
|
||||
{'orange', 'pear', 'apple', 'banana'}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue