Skip to content

GoCelesteAI/python_lambda_functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Python Lambda Functions

Source code from Python Tutorial for Beginners #13 - Lambda Functions.

Files

  • lambda_basics.py - Lambda syntax, multiple arguments, lambda vs def, lambdas in a list
  • lambda_builtins.py - map(), filter(), sorted() with lambda, chained transformations
  • grade_processor.py - Mini project: Grade processor using map, filter, and sorted with lambda

Topics Covered

  • Lambda syntax: lambda arguments: expression
  • Lambda with single and multiple arguments
  • Lambda vs regular function comparison
  • Lambda stored in a list
  • map() applies a lambda to every item
  • filter() keeps items where lambda returns True
  • sorted() with key parameter for custom ordering
  • Multiple transformations chained together

Running

python3 lambda_basics.py
python3 lambda_builtins.py
python3 grade_processor.py

Watch the Tutorial

Python Tutorial for Beginners #13 - Lambda Functions

Taught by CelesteAI

About

Python Tutorial #13 - Lambda Functions (map, filter, sorted, anonymous functions)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages