1. A propos du cours
- Author : Guido van Rossum & the Python development team. :contentReference[oaicite:0]{index=0}
- Type : Official Tutorial (PDF), “Python Tutorial — Release 3.7.0”. :contentReference[oaicite:1]{index=1}
- Language : Français
- Lisence : Python Software Foundation License v2 (documentation license). :contentReference[oaicite:2]{index=2}
2. Short description
A concise yet thorough introduction to Python: from the interpreter and syntax to data types, control flow, functions, modules, OOP, errors & exceptions, I/O, and a tour of the standard library, aligned with Python 3.7. Ideal for readers with basic programming knowledge.
2. Long description
This official Python Tutorial (Release 3.7.0) offers a structured, progressive pathway into the Python language. It starts by explaining what makes Python both easy to learn and powerful, emphasizing its high-level data structures, clean syntax, and practical object-oriented programming model. Readers are encouraged to keep a Python interpreter handy to experiment with examples as they go, building confidence through hands-on practice. :contentReference[oaicite:3]{index=3}
Early chapters introduce the interactive interpreter, how to invoke it, and the basics of source code encoding. You then take an informal tour of core data types—including numbers, strings, and lists—and learn to use Python as a calculator. The tutorial quickly transitions to foundational control flow constructs such as if, for, and while, along with range(), break, continue, and else clauses on loops, laying a strong base for clear, idiomatic programs. :contentReference[oaicite:4]{index=4}
A substantial portion is devoted to functions—from definitions and parameters to default arguments, keyword-only arguments, and annotations. You will also learn about documentation strings, lambda expressions, *args/**kwargs, and best practices around coding style. Next, the tutorial covers modules and packages: how to import, execute modules as scripts, understand the module search path, and organize multi-file codebases with proper package structure. :contentReference[oaicite:5]{index=5}
When you reach data structures, you will explore deeper operations on lists (including list comprehensions), tuples, sets, and dictionaries. The text showcases looping techniques, nuanced comparisons, and the effective use of conditions in real programs—ensuring you write concise, readable, and performant code. :contentReference[oaicite:6]{index=6}
The input/output chapter explains formatted output using f-strings, the format() method, and legacy formatting. You’ll learn practical file handling patterns, from reading and writing text and binary files to leveraging file object methods and persisting structured data with json. These skills are essential for processing datasets, building utilities, and integrating with external systems. :contentReference[oaicite:7]{index=7}
Robust programs require careful handling of errors and exceptions. The tutorial guides you through recognizing syntax errors, working with built-in exceptions, raising and handling them, defining custom exceptions, and ensuring cleanup with try/except/finally blocks. It also touches on exception chaining and best practices for reliable error reporting. :contentReference[oaicite:8]{index=8}
A dedicated unit on classes demystifies namespaces, scope, class definitions, instances, methods, class vs. instance variables, and common OOP patterns like inheritance and multiple inheritance. You’ll also encounter iterators, generators, and generator expressions, which are key to writing efficient, lazy, and composable data pipelines in idiomatic Python. :contentReference[oaicite:9]{index=9}
To broaden your toolkit, the tutorial includes a “brief tour of the standard library,” highlighting modules for OS interfaces, file wildcards, command-line arguments, string pattern matching (re), math, dates & times, data compression, performance measurement, quality control (like unittest), and more. A second tour explores additional modules and features that you’ll routinely encounter in production-grade code. :contentReference[oaicite:10]{index=10}
Practical ecosystem topics—like virtual environments (venv), pip for package management, and general packaging conventions—are introduced to help you isolate dependencies and ship maintainable projects. You’ll also find an appendix that covers interactive mode, executable scripts, and environment customization hooks, making day-to-day development smoother. :contentReference[oaicite:11]{index=11}
Throughout, the writing style is pragmatic and example-driven, preparing readers to progress from foundational scripting to larger applications. While the PDF here is labeled for Python 3.7, the conceptual coverage mirrors the continually updated online tutorial, which is maintained under the PSF’s documentation license (PSF v2). For the freshest version, consult the live docs. :contentReference[oaicite:12]{index=12}
3. Document preview
View or download the document on the original website
This document is hosted by an external source. We do not claim any rights to its content. For any removal requests, please contact the author or the official host.