| 1 |
.. _tutorial-index: |
| 2 |
|
| 3 |
###################### |
| 4 |
The Python Tutorial |
| 5 |
###################### |
| 6 |
|
| 7 |
.. Tip:: This tutorial is designed for |
| 8 |
*programmers* that are new to the Python language, |
| 9 |
**not** *beginners* who are new to programming. |
| 10 |
|
| 11 |
Python is an easy to learn, powerful programming language. It has efficient |
| 12 |
high-level data structures and a simple but effective approach to |
| 13 |
object-oriented programming. Python's elegant syntax and dynamic typing, |
| 14 |
together with its interpreted nature, make it an ideal language for scripting |
| 15 |
and rapid application development in many areas on most platforms. |
| 16 |
|
| 17 |
The Python interpreter and the extensive standard library are freely available |
| 18 |
in source or binary form for all major platforms from the Python website, |
| 19 |
https://www.python.org/, and may be freely distributed. The same site also |
| 20 |
contains distributions of and pointers to many free third party Python modules, |
| 21 |
programs and tools, and additional documentation. |
| 22 |
|
| 23 |
The Python interpreter is easily extended with new functions and data types |
| 24 |
implemented in C or C++ (or other languages callable from C). Python is also |
| 25 |
suitable as an extension language for customizable applications. |
| 26 |
|
| 27 |
This tutorial introduces the reader informally to the basic concepts and |
| 28 |
features of the Python language and system. Be aware that it expects you to |
| 29 |
have a basic understanding of programming in general. It helps to have a Python |
| 30 |
interpreter handy for hands-on experience, but all examples are self-contained, |
| 31 |
so the tutorial can be read off-line as well. |
| 32 |
|
| 33 |
For a description of standard objects and modules, see :ref:`library-index`. |
| 34 |
:ref:`reference-index` gives a more formal definition of the language. To write |
| 35 |
extensions in C or C++, read :ref:`extending-index` and |
| 36 |
:ref:`c-api-index`. There are also several books covering Python in depth. |
| 37 |
|
| 38 |
This tutorial does not attempt to be comprehensive and cover every single |
| 39 |
feature, or even every commonly used feature. Instead, it introduces many of |
| 40 |
Python's most noteworthy features, and will give you a good idea of the |
| 41 |
language's flavor and style. After reading it, you will be able to read and |
| 42 |
write Python modules and programs, and you will be ready to learn more about the |
| 43 |
various Python library modules described in :ref:`library-index`. |
| 44 |
|
| 45 |
The :ref:`glossary` is also worth going through. |
| 46 |
|
| 47 |
.. toctree:: |
| 48 |
:numbered: |
| 49 |
|
| 50 |
appetite.rst |
| 51 |
interpreter.rst |
| 52 |
introduction.rst |
| 53 |
controlflow.rst |
| 54 |
datastructures.rst |
| 55 |
modules.rst |
| 56 |
inputoutput.rst |
| 57 |
errors.rst |
| 58 |
classes.rst |
| 59 |
stdlib.rst |
| 60 |
stdlib2.rst |
| 61 |
venv.rst |
| 62 |
whatnow.rst |
| 63 |
interactive.rst |
| 64 |
floatingpoint.rst |
| 65 |
appendix.rst |