PyAI Learn Türkçe

Module 11

Advanced Python

closures, flexible signatures, lambda, generators

When you finish this module you can say:

I can read library code written with generators, closures, and flexible signatures.

By the end of this module you'll be able to write a loader class that splits data into batches and hands them out one at a time, without ever filling up memory.

Start

Lessons

6 lessons · ≈ 59 min

  1. Scope and closures9 min
  2. The default argument trap10 min
  3. lambda and sort keys9 min
  4. Generators and yield10 min
  5. Recursion9 min
  6. Project: Mini loader12 min · project

Practice exercises

Short writing exercises, independent of the lessons: Go to the exercises

  1. A function that makes lines
  2. A flexible record
  3. Sort by score
  4. An even-number generator
  5. How deep is the list