|
29 | 29 | }, |
30 | 30 | { |
31 | 31 | "cell_type": "code", |
32 | | - "execution_count": 2, |
| 32 | + "execution_count": 1, |
33 | 33 | "metadata": {}, |
34 | 34 | "outputs": [ |
35 | 35 | { |
36 | 36 | "data": { |
37 | 37 | "text/plain": [ |
38 | | - "{1, 2, 3}" |
| 38 | + "{1, 2, 3, 12}" |
39 | 39 | ] |
40 | 40 | }, |
41 | | - "execution_count": 2, |
| 41 | + "execution_count": 1, |
42 | 42 | "metadata": {}, |
43 | 43 | "output_type": "execute_result" |
44 | 44 | } |
45 | 45 | ], |
46 | 46 | "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}" |
48 | 48 | ] |
49 | 49 | }, |
50 | 50 | { |
51 | 51 | "cell_type": "code", |
52 | | - "execution_count": 3, |
| 52 | + "execution_count": 5, |
53 | 53 | "metadata": {}, |
54 | 54 | "outputs": [ |
55 | 55 | { |
56 | 56 | "name": "stdout", |
57 | 57 | "output_type": "stream", |
58 | 58 | "text": [ |
59 | | - "{'banana', 'orange', 'mango', 'cherry', 'grapes', 'apple'}\n" |
| 59 | + "{'apple', 'cherry', 'banana'}\n", |
| 60 | + "{'mango', 'grapes', 'banana', 'cherry', 'apple', 'orange'}\n" |
60 | 61 | ] |
61 | 62 | } |
62 | 63 | ], |
63 | 64 | "source": [ |
64 | 65 | "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", |
67 | 68 | "\n", |
68 | 69 | "print(thisset)" |
69 | 70 | ] |
70 | 71 | }, |
71 | 72 | { |
72 | 73 | "cell_type": "code", |
73 | | - "execution_count": 4, |
| 74 | + "execution_count": 6, |
74 | 75 | "metadata": {}, |
75 | 76 | "outputs": [ |
76 | 77 | { |
|
82 | 83 | } |
83 | 84 | ], |
84 | 85 | "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", |
86 | 87 | "s=set(p)\n", |
87 | 88 | "print(s)" |
88 | 89 | ] |
|
0 commit comments