Skip to content

Commit d32c7d9

Browse files
committed
Update Sets.ipynb
1 parent 1548d94 commit d32c7d9

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

Sets.ipynb

+11-10
Original file line numberDiff line numberDiff line change
@@ -29,48 +29,49 @@
2929
},
3030
{
3131
"cell_type": "code",
32-
"execution_count": 2,
32+
"execution_count": 1,
3333
"metadata": {},
3434
"outputs": [
3535
{
3636
"data": {
3737
"text/plain": [
38-
"{1, 2, 3}"
38+
"{1, 2, 3, 12}"
3939
]
4040
},
41-
"execution_count": 2,
41+
"execution_count": 1,
4242
"metadata": {},
4343
"output_type": "execute_result"
4444
}
4545
],
4646
"source": [
47-
"{1,2,3,1,2,1,2,3,3,3,3,2,2,2,1,1,2}"
47+
"{1,2,3,1,2,1,2,3,3,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,2,2,1,1,2}"
4848
]
4949
},
5050
{
5151
"cell_type": "code",
52-
"execution_count": 3,
52+
"execution_count": 5,
5353
"metadata": {},
5454
"outputs": [
5555
{
5656
"name": "stdout",
5757
"output_type": "stream",
5858
"text": [
59-
"{'banana', 'orange', 'mango', 'cherry', 'grapes', 'apple'}\n"
59+
"{'apple', 'cherry', 'banana'}\n",
60+
"{'mango', 'grapes', 'banana', 'cherry', 'apple', 'orange'}\n"
6061
]
6162
}
6263
],
6364
"source": [
6465
"thisset = {\"apple\", \"banana\", \"cherry\"}\n",
65-
"\n",
66-
"thisset.update([\"orange\", \"mango\", \"grapes\"])\n",
66+
"print(thisset)\n",
67+
"thisset.update([ \"grapes\",\"orange\", \"mango\",\"banana\",\"apple\", \"banana\", \"cherry\"])\n",
6768
"\n",
6869
"print(thisset)"
6970
]
7071
},
7172
{
7273
"cell_type": "code",
73-
"execution_count": 4,
74+
"execution_count": 6,
7475
"metadata": {},
7576
"outputs": [
7677
{
@@ -82,7 +83,7 @@
8283
}
8384
],
8485
"source": [
85-
"p=(1,2,3,1,2,1,2,3,3,3,3,2,2,2,1,1,1)\n",
86+
"p=[1,2,3,1,2,1,2,3,3,3,3,2,2,2,1,1,1]\n",
8687
"s=set(p)\n",
8788
"print(s)"
8889
]

0 commit comments

Comments
 (0)