Message77201
On http://docs.python.org/3.0/tutorial/datastructures.html#sets there is
the following section in the section on sets
>>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}
>>> print(basket)
{'orange', 'bananna', 'pear', 'apple'}
>>> fruit = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
>>> fruit = set(basket) # create a set without duplicates
>>> fruit
{'orange', 'pear', 'apple', 'banana'}
The third command should be an assignment to basket rather than fruit. |
|
Date |
User |
Action |
Args |
2008-12-07 01:10:18 | jmarter | set | recipients:
+ jmarter, georg.brandl |
2008-12-07 01:10:12 | jmarter | set | messageid: <1228612211.41.0.0899785129664.issue4570@psf.upfronthosting.co.za> |
2008-12-07 01:10:09 | jmarter | link | issue4570 messages |
2008-12-07 01:10:08 | jmarter | create | |
|