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

Python    |    Beginner
  • 11 videos | 1h 31m 19s
  • Includes Assessment
  • Earns a Badge
Rating 4.6 of 59 users Rating 4.6 of 59 users (59)
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.

WHAT YOU WILL LEARN

  • 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

IN THIS COURSE

  • 2m 4s
  • 9m 54s
  • Locked
    3.  Creating Python Lambdas with Special Input Arguments
    7m 59s
  • Locked
    4.  Using Filter and Map Functions with Lambda in Python
    6m 8s
  • Locked
    5.  Creating Generators in Python
    9m 16s
  • Locked
    6.  Illustrating the Use of the Yield Keyword in Python
    11m 36s
  • Locked
    7.  Creating and Using Closures in Python
    10m 59s
  • Locked
    8.  Illustrating the Finer Points of Closures in Python
    8m 43s
  • Locked
    9.  Modifying Code Using Python Decorators
    10m 46s
  • Locked
    10.  Perform Checks on Input Arguments Using Decorators
    10m 49s
  • Locked
    11.  Course Summary
    3m 5s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.

Digital badges are yours to keep, forever.

YOU MIGHT ALSO LIKE

Rating 4.5 of 93 users Rating 4.5 of 93 users (93)
Rating 4.6 of 301 users Rating 4.6 of 301 users (301)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.5 of 113 users Rating 4.5 of 113 users (113)
Rating 4.6 of 4247 users Rating 4.6 of 4247 users (4247)
Rating 4.6 of 2165 users Rating 4.6 of 2165 users (2165)