filmov
tv
Lambda Functions in Python - 60 Seconds to Code

Показать описание
Welcome to 60 seconds to code where I show you how to code in 60 seconds or less.
Today you will learn about lambda functions. Lambda functions are anonymous function that you can optionally name. They can be used to write quick functions that require a simple return value. One common use of Lambda functions is for sorting and filtering lists.
Step 3 – In line 3 type print(get_last_name('John Adams')).
Step 5 – Type print(founding_fathers) on line 5 and run the file in the python interpreter.
The code is available in a link in the description.
Congratulations, you have learned about lambda functions. For your homework, make a modification to the lambda function such that it does not run in to problems if someone forgets to capitalize the last name of a founding father.
Learn #lambda functions in #python #100DaysOfCode #301DaysofCode #60secondstocode
Today you will learn about lambda functions. Lambda functions are anonymous function that you can optionally name. They can be used to write quick functions that require a simple return value. One common use of Lambda functions is for sorting and filtering lists.
Step 3 – In line 3 type print(get_last_name('John Adams')).
Step 5 – Type print(founding_fathers) on line 5 and run the file in the python interpreter.
The code is available in a link in the description.
Congratulations, you have learned about lambda functions. For your homework, make a modification to the lambda function such that it does not run in to problems if someone forgets to capitalize the last name of a founding father.
Learn #lambda functions in #python #100DaysOfCode #301DaysofCode #60secondstocode