FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
code-guild/code-guild/python/numeric/sets.py at master · grantholly/code-guild · GitHub
grantholly
code-guild
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
code-guild
/
code-guild
/
python
/
numeric
/
sets.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (18 loc) · 356 Bytes
Breadcrumbs
code-guild
/
code-guild
/
python
/
numeric
/
sets.py
Copy path
File metadata and controls
35 lines (18 loc) · 356 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
__author__
=
'grant'
a
=
set
(
'abc'
)
b
=
set
(
'xyz'
)
c
=
set
(
'cxq'
)
print
(
'c'
in
a
)
print
(
'q'
in
a
)
print
(
a
-
b
)
#difference
print
(
a
|
c
)
#union
print
(
a
&
c
)
#intersection
print
(
a
.
intersection
(
c
))
print
(
a
>
c
)
#a is a superset of c?
print
(
a
<
c
)
#a is a subset of c
b
.
add
(
'qrs'
)
print
(
b
)
b
.
update
(
'q'
,
'r'
)
print
(
b
)
b
.
remove
(
'qrs'
)
print
(
b
)
Back
|
FazBrowse Home
|
New Git URL