Advanced Python Exercises

Table of Contents

Topics

  1. Decorators
    • Introduced in Python 2.4 (2005)
    • Similar concepts: Annotations (Java), Attributes (C#)
  2. Generators
    • Introduced in Python 2.2 (2001)
    • Similar concepts: Iterator (Java), IEnumerable (C#)
  3. Context Managers
    • Introduced in Python 2.5 (2006)
    • Similar concepts: try-with-resources (Java), using (C#)
  4. Metaclasses
    • Introduced in Python 2.2 (2001)
    • Similar concepts: Reflection (Java), Reflection (C#)
  5. Descriptors
    • Introduced in Python 2.2 (2001)
    • Similar concepts: Property (C#), Getter/Setter (Java)
  6. Abstract Base Classes (ABC)
    • Introduced in Python 2.6 (2008)
    • Similar concepts: Interface (Java), Abstract Class (C#)
  7. Coroutines and Asynchronous Programming
    • Coroutines introduced in Python 2.5 (2006)
    • Async/await syntax introduced in Python 3.5 (2015)
    • Similar concepts: Coroutines (C#), CompletableFuture (Java)
  8. Operator Overloading
    • Introduced in Python 1.0 (1994)
    • Similar concepts: Operator Overloading (C++), Operator Overloading (C#)
  9. Advanced List Comprehensions and Generator Expressions
    • List comprehensions introduced in Python 2.0 (2000)
    • Generator expressions introduced in Python 2.4 (2005)
    • Similar concepts: Stream API (Java), LINQ (C#)
  10. Closures
    • Introduced in Python 2.2 (2001)
    • Similar concepts: Lambda Expressions (Java), Anonymous Functions (C#)

Instructions

For each topic, complete the exercise in the corresponding Python file.
The exercises are designed to help you practice and understand the
advanced Python language features.

Resources

Books

Author: Jason Walsh

j@wal.sh

Last Updated: 2024-08-02 20:01:20