You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -332,7 +332,7 @@ The various types of literals available in Python are as follows:
332
332
333
333
Numeric literals are used for representing numeric values in the source code. They can be of three types - integers, float point numbers and imaginary numbers.
334
334
335
-
#### a) Integer Literals
335
+
#### Integer Literals
336
336
337
337
Integer literals are numbers without any fractional component.
338
338
@@ -383,7 +383,7 @@ They are ignored while determining the actual numerical value of the literal.
383
383
384
384
Some valid underscore usages are - `10_00_00_000`, `0b_1110_0101`, `0x23_123`.
385
385
386
-
#### b) Floating Point Literals
386
+
#### Floating Point Literals
387
387
388
388
Floating point literals are real numbers present in the source code. They contain fractional component and/or exponential component.
389
389
@@ -405,7 +405,7 @@ The exponential component can be identified by the letter `e` or `E` followed by
405
405
406
406
For example, `3.4E2` is equivalent to `3.4 x 10^2` or `340.0`, whereas `3.4e-2` is equivalent to `3.4 x 10^-2` or `.034`.
407
407
408
-
#### c) Imaginary Literals
408
+
#### Imaginary Literals
409
409
410
410
To specify complex numbers and perform complex number mathematics, Python supports imaginary literals which are given by real or integer number followed by the letter `j` or `J` which represents the unit imaginary number.
411
411
@@ -921,41 +921,41 @@ Often sequence, set and mapping types are also collectively known as **iterables
921
921
922
922
Numeric data types are used for storing the following types of numbers:
923
923
924
-
#### i. Integer Numbers
924
+
#### Integer Numbers
925
925
926
926
Objects holding integer numbers like `-1, 0, 200` are of `int` data type.
927
927
928
-
#### ii. Real or Floating-point Numbers
928
+
#### Real or Floating-point Numbers
929
929
930
930
Objects holding real or floating point numbers like `-1.1, 3e2, 20.0` are of `float` data type.
931
931
932
-
#### iii. Complex Numbers
932
+
#### Complex Numbers
933
933
934
934
Objects storing complex numbers like `2 + 1j, -3j, -1 + 2J` are of type `complex`.
935
935
936
936
Each complex number has two parts, the real part which is a numeric integer or floating point literal, and the imaginary part which is an imaginary literal.
937
937
938
-
#### iv. Boolean
938
+
#### Boolean
939
939
940
940
The boolean data type (`bool`) is a subtype of `int`. It stores the evaluated value of expressions represented as keywords - `True` (integer value `1`) and `False` (integer value `0`).
941
941
942
942
### Sequence Types
943
943
944
944
An ordered collection of items where each item can be accessed using an integer index is known as a sequence. The following three sequence data types are available in Python:
945
945
946
-
#### i. String
946
+
#### String
947
947
948
948
A string (`str` data type) is a sequence of zero or more unicode characters enclosed within a pair of single (`'`) or double (`"`) quotes.
949
949
950
950
Some example strings are - `"42", 'hello', "python"`.
951
951
952
-
#### ii. List
952
+
#### List
953
953
954
954
A `list` is sequence of items of same or different data types which are enclosed within brackets - `[ ]`.
955
955
956
956
Some example lists are - `[1, 2, 3]`, `['abc', 23, 3.14]`, `['edpunk', 'python']`.
957
957
958
-
#### iii. Tuple
958
+
#### Tuple
959
959
960
960
A `tuple` is an immutable sequence of items of same or different data types which are enclosed within parentheses - `( )`.
0 commit comments