File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -128,24 +128,24 @@ Set
128
128
```
129
129
130
130
### Frozen Set
131
- * ** Frozen set is immutable and hashable set .**
132
- * ** It can be used as a key in a dictionary or as an element in a set.**
131
+ * ** Is immutable and hashable.**
132
+ * ** That means it can be used as a key in a dictionary or as an element in a set.**
133
133
``` python
134
134
< frozenset > = frozenset (< collection> )
135
135
```
136
136
137
137
138
138
Tuple
139
139
-----
140
- ** Tuple is immutable and hashable list.**
140
+ ** Tuple is an immutable and hashable list.**
141
141
``` python
142
142
< tuple > = ()
143
143
< tuple > = (< el> , )
144
144
< tuple > = (< el_1> , < el_2> , ... )
145
145
```
146
146
147
147
### Named Tuple
148
- ** Named tuple is tuple 's subclass with named elements.**
148
+ ** Tuple 's subclass with named elements.**
149
149
150
150
``` python
151
151
>> > from collections import namedtuple
Original file line number Diff line number Diff line change @@ -288,19 +288,19 @@ <h2 id="set"><a href="#set" name="set">#</a>Set</h2>
288
288
</ code > </ pre >
289
289
< h3 id ="frozenset "> Frozen Set</ h3 >
290
290
< ul >
291
- < li > < strong > Frozen set is immutable and hashable set .</ strong > </ li >
292
- < li > < strong > It can be used as a key in a dictionary or as an element in a set.</ strong > </ li >
291
+ < li > < strong > Is immutable and hashable.</ strong > </ li >
292
+ < li > < strong > That means it can be used as a key in a dictionary or as an element in a set.</ strong > </ li >
293
293
</ ul >
294
294
< pre > < code class ="python language-python hljs "> <frozenset> = frozenset(<collection>)
295
295
</ code > </ pre >
296
296
< h2 id ="tuple "> < a href ="#tuple " name ="tuple "> #</ a > Tuple</ h2 >
297
- < p > < strong > Tuple is immutable and hashable list.</ strong > </ p >
297
+ < p > < strong > Tuple is an immutable and hashable list.</ strong > </ p >
298
298
< pre > < code class ="python language-python hljs "> <tuple> = ()
299
299
<tuple> = (<el>, )
300
300
<tuple> = (<el_1>, <el_2>, ...)
301
301
</ code > </ pre >
302
302
< h3 id ="namedtuple "> Named Tuple</ h3 >
303
- < p > < strong > Named tuple is tuple 's subclass with named elements.</ strong > </ p >
303
+ < p > < strong > Tuple 's subclass with named elements.</ strong > </ p >
304
304
< pre > < code class ="python language-python hljs "> < span class ="hljs-meta "> >>> </ span > < span class ="hljs-keyword "> from</ span > collections < span class ="hljs-keyword "> import</ span > namedtuple
305
305
< span class ="hljs-meta "> >>> </ span > Point = namedtuple(< span class ="hljs-string "> 'Point'</ span > , < span class ="hljs-string "> 'x y'</ span > )
306
306
< span class ="hljs-meta "> >>> </ span > p = Point(< span class ="hljs-number "> 1</ span > , y=< span class ="hljs-number "> 2</ span > )
You can’t perform that action at this time.
0 commit comments