@@ -12,7 +12,7 @@ Numeric types
1212
1313There are 3 distinct numeric types: *integers*, *floating point numbers*, and
1414*complex numbers*. In addition, Booleans are a subtype of integers. Integers
15- have unlimited precision. Floating point numbers are usually implemented usign
15+ have unlimited precision. Floating point numbers are usually implemented using
1616``double`` in C. Complex numbers have a real and imaginary part, which are each
1717a floating point number.
1818
@@ -127,7 +127,7 @@ They may be constructed in several ways:
127127- using a pair of square brackets to denote the empty list: ``[]``
128128- using square brackets, separating items with commas: ``[a]``, ``[a, b, c]``
129129- using a list comprehension: ``[x for x in iterable]``
130- - using the type constuctor : ``list()`` or ``list(iterable)``
130+ - using the type constructor : ``list()`` or ``list(iterable)``
131131
132132Tuples
133133------
@@ -185,7 +185,7 @@ types results in inequality, and ordering comparison across these types raises
185185
186186Sequences compare lexicographically using comparison of corresponding elements.
187187The built-in containers typically assume identical objects are equal to
188- themselves. Lexicographical comparison between buit -in collections works as
188+ themselves. Lexicographical comparison between built -in collections works as
189189follows:
190190
191191- For two collections to compare equal, they must be of the same type, have
@@ -207,16 +207,16 @@ Mutable sequence types
207207+--------------------+--------------------------------------------------------+
208208| ``del s[i:j]`` | same as ``s[i:j] = []`` |
209209+--------------------+--------------------------------------------------------+
210- | ``s[i:j:k] = t`` | the elements of *s* are replaced by those of *t*[#]_ |
210+ | ``s[i:j:k] = t`` | the elements of *s* are replaced by those of *t* [#]_ |
211211+--------------------+--------------------------------------------------------+
212212| ``del s[i:j:k]`` | removes the elements of ``s[i:j:k]`` from the list |
213213+--------------------+--------------------------------------------------------+
214214| ``s.append(x)`` | appends *x* to the end of the sequence; the same as |
215215| | ``s[len(s):len(s)] = [x]`` |
216216+--------------------+--------------------------------------------------------+
217- | ``s.clear()`` | removes all items from *s* (``del s[:]``)[#3.3 ]_ |
217+ | ``s.clear()`` | removes all items from *s* (``del s[:]``)[#new ]_ |
218218+--------------------+--------------------------------------------------------+
219- | ``s.copy()`` | creates a shallow copy of *s* (``s[:]``)[#3.3 ]_ |
219+ | ``s.copy()`` | creates a shallow copy of *s* (``s[:]``)[#new ]_ |
220220+--------------------+--------------------------------------------------------+
221221| ``s.extend(t)`` | extends *s* with the contents of *t* |
222222| ``s += t`` | |
@@ -233,7 +233,7 @@ Mutable sequence types
233233+--------------------+--------------------------------------------------------+
234234
235235.. [#] *t* must have the same length as the slice it is replacing
236- .. [#3.3 ] new in Python version 3.3
236+ .. [#new ] new in Python version 3.3
237237
238238Text sequence type
239239==================
@@ -316,8 +316,8 @@ Dictionaries can be created by several means:
316316
317317- Use braces to denote the empty dictionary: ``{}``
318318- Use a comma-separated list of ``key: value`` pairs with braces:
319- ``{'first_name': 'Serhii', 'last_name': 'Horodilov', 'age': 34}
320- - Use a dict comprehension: `{x: x ** 2 for x in range(10)}``
319+ ``{'first_name': 'Serhii', 'last_name': 'Horodilov', 'age': 34}``
320+ - Use a dict comprehension: `` {x: x ** 2 for x in range(10)}``
321321- Use the type constructor: ``dict()``, ``dict([('key', 100)])``,
322322 ``dict(key=100)``
323323
0 commit comments