-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathset_in_python.py
More file actions
49 lines (46 loc) · 1.1 KB
/
set_in_python.py
File metadata and controls
49 lines (46 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ijkl={1,2,-23,90,-34,85,-3,45,True}
#orange=set()
#print(ijkl)
#print(ijkl.pop())
#print(ijkl)
#print(len(ijkl))
#print(type(ijkl))
#print(type(orange))
#print(orange)
cr_1={1,2,3,4,5}
cr_2={4,5,6,10,11}
se_1={'aaksh','jenny','shyam'}
se_2={'jenny','jiya','ram'}
###it basically find and not retrun the duplicated value(|)=union
#print(cr_1.union(cr_2))
##symbol of union (|)
#print(cr_1|cr_2)
#update
#cr_1.union(("aakash"))
#print(cr_1)
#cr_1|=cr_2
#print(cr_1)
##only show duplication syblom use (&)=insection
#print(cr_1.intersection(['mohan','shivam']))
#print(cr_1&cr_2)
## its different the insection of duplicatio
#cr_1.intersection_update(cr_2)
#print(cr_1)
#cr_1&=cr_2
#print(cr_1)
#differnce operator with symbol(-)=difference
#print(cr_1.difference(cr_2))
#print(cr_1-cr_2)
#update of difference
##cr_1.difference_update("aaksha")
#print(cr_1)
#cr_1-=cr_2
#print(cr_1)
#symmetric_difference symbol with(^)=symmetric_difference
#print(cr_1.symmetric_difference(cr_2))
#print(cr_1^cr_2)
#.symmetric_difference_update
#cr_1.symmetric_difference_update(('aakash','jeeny',3))
#print(cr_1)
#se_1^=se_2
#print(se_1)