1.2 - Python Sets
1.2 - Python Sets
1
Error/
Information Flashback Class Exercise
Warning
2
Python Sets
Creation, Functions, Methods
3
Set Creation
4
Set
5
Set
Set supports operations like union, intersection, difference & symmetric difference
6
Set
7
Set
8
TRY IT
Consider the list: [12, 45, 65, 65, 87, 98, 65]
9
TRY IT
Create a blank set. Check the type of the object using the type() function.
10
Built-in Functions
11
len()
12
max()
Numeric
values
Character
values
13
min()
Numeric
values
Character
values
14
Set Methods
15
Add elements to a set
16
Delete elements from a set
17
Difference between remove() and discard() method
19
Delete a set
20
Set operations : union
21
Set operations : intersection
22
Set operations : difference
23
Set operations : symmetric difference
24
We learnt the collection objects...
Create using [] () {} {}
Editable
25
Thank You