Skip to content

Commit 9ff44ca

Browse files
committed
Set Union Method
1 parent f9746c4 commit 9ff44ca

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Sets.ipynb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,28 @@
111111
"print(thisset)"
112112
]
113113
},
114+
{
115+
"cell_type": "code",
116+
"execution_count": 6,
117+
"metadata": {},
118+
"outputs": [
119+
{
120+
"name": "stdout",
121+
"output_type": "stream",
122+
"text": [
123+
"{1, 2, 3}\n",
124+
"{1, 2, 3, 'c', 'a', 'b'}\n"
125+
]
126+
}
127+
],
128+
"source": [
129+
"set1 = {\"a\", \"b\" , \"c\"}\n",
130+
"set2 = {1, 2,1, 3}\n",
131+
"print(set2)\n",
132+
"set3 = set1.union(set2)\n",
133+
"print(set3)"
134+
]
135+
},
114136
{
115137
"cell_type": "code",
116138
"execution_count": null,

0 commit comments

Comments
 (0)