Skip to content

Commit c567e13

Browse files
committed
📝 Update the introduction to data types
1 parent 11b72d2 commit c567e13

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

docs/types/index.rst

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
11
Data types
22
==========
33

4-
Python has several built-in data types, such as :doc:`numbers` (integers,
5-
floating point numbers, complex numbers), :doc:`strings <strings/index>`,
6-
:doc:`lists`, :doc:`tuples`, :doc:`dicts`, :doc:`sets` and :doc:`files`. These
7-
data types can be manipulated using language operators, built-in functions,
8-
library functions or a data type’s own methods.
4+
Python has several built-in data types, from scalars such as numbers and boolean
5+
values to more complex structures such as sequences, sets, dictionaries and
6+
strings.
7+
8+
+-----------------------+-----------------------------------------------+
9+
| Data type | Examples |
10+
+=======================+===============================================+
11+
| Numeric types | :class:`int`, :class:`float`, :class:`complex`|
12+
+-----------------------+-----------------------------------------------+
13+
| Boolean type | :class:`bool` |
14+
+-----------------------+-----------------------------------------------+
15+
| Sequences | :class:`list`, :class:`tuple` |
16+
+-----------------------+-----------------------------------------------+
17+
| Sets | :class:`set`, :class:`frozenset` |
18+
+-----------------------+-----------------------------------------------+
19+
| Mappings | :class:`dict` |
20+
+-----------------------+-----------------------------------------------+
21+
| Strings | :class:`str` |
22+
+-----------------------+-----------------------------------------------+
23+
| Files | :func:`open <open>` |
24+
+-----------------------+-----------------------------------------------+
25+
26+
These data types can be manipulated using language operators, built-in
27+
functions, library functions or a data type’s own methods.
928

1029
You can also define your own classes and create your own class instances. For
1130
these class instances, you can define methods as well as manipulate them using

0 commit comments

Comments
 (0)