5910 Breckenridge Pkwy Suite B, Tampa, FL. 33610
(800) 272-0707

SkillSoft Explore Course

Aspire     Pythonista to Python Master     Python Master Track 1: Python for Developers
Lambdas are great for on-off use and, once stored in a variable, behave exactly like other function objects in Python. In this course, you'll learn how to create anonymous functions in Python using lambdas.
You'll start by creating generator functions in Python to generate infinite sequences using the yield keyword. You'll then illustrate how these generator functions can be resumed from just after the previous yielded value.
Moving along, you'll demonstrate how closures in Python are nested functions that keep track of local variables in the outer function. You'll also illustrate how decorators - bits of code allowing you to modify other pre-existing code in your program - can be implemented using closures.
When you're finished with this course, you'll have a good grip of functions in Python, which allow you to perform some incredibly complex and powerful operations.

Objectives

Python Development: Leveraging Functions with Lambdas, Generators, Closures, & Decorators

  • discover the key concepts covered in this course
  • define anonymous functions using lambdas
  • pass variable length arguments to lambda functions
  • use the filter and map functions specifying a lambda as a predicate
  • create infinite sequences using generator functions
  • illustrate the features of the yield keyword in generator functions
  • create closures with access to local state variables
  • illustrate the use of local and nonlocal variables in closures
  • modify pre-existing code using decorators
  • use decorators for performing validity checks on input arguments
  • summarize the key concepts covered in this course