Autosave: 2023-04-03 07:15:40
This commit is contained in:
parent
d0ccaf5b5d
commit
6e85a4552e
1 changed files with 14 additions and 0 deletions
|
@ -69,6 +69,20 @@ print(basket)
|
|||
# {'apricot', 'pear', 'banana', 'orange'}
|
||||
```
|
||||
|
||||
## Start with empty set
|
||||
|
||||
To declare an empty set you cannot just do:
|
||||
|
||||
```py
|
||||
my_set = {}
|
||||
```
|
||||
|
||||
You have to use a constructor:
|
||||
|
||||
```py
|
||||
my_set = set()
|
||||
```
|
||||
|
||||
## Apply unions and intersections
|
||||
|
||||
```python
|
||||
|
|
Loading…
Add table
Reference in a new issue