01An Informal Introduction to Python

  1. 01An Informal Introduction to Python
  2. 02Numbers
  3. 03Text
  4. 04Lists
  5. 05First Steps Towards Programming

02More Control Flow Tools

  1. 06if Statements
  2. 07for Statements
  3. 08The range() Function
  4. 09break and continue Statements
  5. 10else Clauses on Loops
  6. 11pass Statements
  7. 12match Statements
  8. 13Defining Functions
  9. 14Default Argument Values
  10. 15Keyword Arguments
  11. 16Special parameters
  12. 17Arbitrary Argument Lists
  13. 18Unpacking Argument Lists
  14. 19Lambda Expressions
  15. 20Documentation Strings
  16. 21Function Annotations
  17. 22Intermezzo: Coding Style

03Data Structures

  1. 23More on Lists
  2. 24Using Lists as Stacks
  3. 25Using Lists as Queues
  4. 26List Comprehensions
  5. 27Nested List Comprehensions
  6. 28The del statement
  7. 29Tuples and Sequences
  8. 30Sets
  9. 31Dictionaries
  10. 32Looping Techniques
  11. 33More on Conditions
  12. 34Comparing Sequences and Other Types

04Modules

  1. 35Modules
  2. 36More on Modules
  3. 37Executing modules as scripts
  4. 38The Module Search Path
  5. 39“Compiled” Python files
  6. 40Standard Modules
  7. 41The dir() Function
  8. 42Packages
  9. 43Importing * From a Package
  10. 44Intra-package References

05Input and Output

  1. 45Fancier Output Formatting
  2. 46Formatted String Literals
  3. 47The String format() Method
  4. 48Manual String Formatting
  5. 49Old string formatting
  6. 50Reading and Writing Files
  7. 51Methods of File Objects
  8. 52Saving structured data with json

06Errors and Exceptions

  1. 53Syntax Errors
  2. 54Exceptions
  3. 55Handling Exceptions
  4. 56Raising Exceptions
  5. 57Exception Chaining
  6. 58User-defined Exceptions
  7. 59Defining Clean-up Actions
  8. 60Predefined Clean-up Actions
  9. 61Raising and Handling Multiple Unrelated Exceptions
  10. 62Enriching Exceptions with Notes

07Classes

  1. 63Classes
  2. 64A Word About Names and Objects
  3. 65Python Scopes and Namespaces
  4. 66Scopes and Namespaces Example
  5. 67Class Definition Syntax
  6. 68Class Objects
  7. 69Instance Objects
  8. 70Method Objects
  9. 71Class and Instance Variables
  10. 72Random Remarks
  11. 73Inheritance
  12. 74Multiple Inheritance
  13. 75Private Variables
  14. 76Odds and Ends
  15. 77Iterators
  16. 78Generators
  17. 79Generator Expressions