SlideShare a Scribd company logo
Lambda and Import
‫إعداد‬:
‫م‬.‫محمد‬ ‫علي‬
objectives
 Lambda function
 Using Import keyword in Python
Lambda Function
 A lambda function is a small anonymous function.
 A lambda function can take any number of arguments, but can only have
one expression.
 Syntax
lambda arguments : expression
The expression is executed and the result is returned
Lambda Function
 Example:
x = lambda a : a + 10
print(x(5))
 Result
15
Lambda Function
 Example:
x = lambda a : a * 10
print(x(10))
 Result
100
 Example
x = lambda a, b : a * b
print(x(5, 6))
 Result
30
Why Use Lambda Functions?
 The power of lambda is better shown when you use them as an
anonymous function inside another function.
 Say We have a function definition that takes one argument, and that
argument will be multiplied with an unknown number
def myfunc(n):
return lambda a : a * n
mydoubler = myfunc(2)
print(mydoubler(11))
Result: 22
Import in python
 We use import keyword to import libraries to our code
 Syntax
import library_name;
 We can use one method from library using from keyword
from library import method1
 We can use a shortcuts for library to short it’s name
import library as lib
 If some library has many method we need we can use (*) to import all of it
from library import *
Import in python example
 Import os
 import matplotlib.pyplot as pit
 from sklearn import datasets
 from cryptography.fernet import *

More Related Content

What's hot

FUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPTFUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPT
03062679929
 
Operator overloading
Operator overloadingOperator overloading
Operator overloading
Burhan Ahmed
 
Intro to functional programming
Intro to functional programmingIntro to functional programming
Intro to functional programming
Assaf Gannon
 
First approach in linq
First approach in linqFirst approach in linq
First approach in linq
Vignesh Nethaji
 
Inline function
Inline functionInline function
Inline functionTech_MX
 
08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.ppt08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.pptTareq Hasan
 
Function overloading
Function overloadingFunction overloading
Function overloading
Selvin Josy Bai Somu
 
Presentation on overloading
Presentation on overloading Presentation on overloading
Presentation on overloading Charndeep Sekhon
 
Introduction to functional programming (In Arabic)
Introduction to functional programming (In Arabic)Introduction to functional programming (In Arabic)
Introduction to functional programming (In Arabic)
Omar Abdelhafith
 
C++ overloading
C++ overloadingC++ overloading
C++ overloading
sanya6900
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
Mohammed Sikander
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScript
Will Livengood
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
Nilesh Dalvi
 
Operator overloading
Operator overloadingOperator overloading
Operator overloading
Ramish Suleman
 
C++ Function
C++ FunctionC++ Function
C++ FunctionHajar
 
Operator overloading
Operator overloadingOperator overloading
Operator overloadingabhay singh
 
Function overloading(C++)
Function overloading(C++)Function overloading(C++)
Function overloading(C++)
Ritika Sharma
 

What's hot (20)

FUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPTFUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPT
 
Operator overloading
Operator overloadingOperator overloading
Operator overloading
 
Intro to functional programming
Intro to functional programmingIntro to functional programming
Intro to functional programming
 
First approach in linq
First approach in linqFirst approach in linq
First approach in linq
 
Inline function
Inline functionInline function
Inline function
 
08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.ppt08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.ppt
 
Function overloading
Function overloadingFunction overloading
Function overloading
 
Presentation on overloading
Presentation on overloading Presentation on overloading
Presentation on overloading
 
Introduction to functional programming (In Arabic)
Introduction to functional programming (In Arabic)Introduction to functional programming (In Arabic)
Introduction to functional programming (In Arabic)
 
C++ overloading
C++ overloadingC++ overloading
C++ overloading
 
Daa
DaaDaa
Daa
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScript
 
Functions in c++
Functions in c++Functions in c++
Functions in c++
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
 
Operator overloading
Operator overloadingOperator overloading
Operator overloading
 
C++ Function
C++ FunctionC++ Function
C++ Function
 
Operator overloading
Operator overloadingOperator overloading
Operator overloading
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
 
Function overloading(C++)
Function overloading(C++)Function overloading(C++)
Function overloading(C++)
 

Similar to Ninth session

Python lambda.pptx
Python lambda.pptxPython lambda.pptx
Python lambda.pptx
prakashvs7
 
Python Lambda Function
Python Lambda FunctionPython Lambda Function
Python Lambda Function
Md Soyaib
 
functions.pptx
functions.pptxfunctions.pptx
functions.pptx
KavithaChekuri3
 
C#-LINQ-and-Lambda-Expression
C#-LINQ-and-Lambda-ExpressionC#-LINQ-and-Lambda-Expression
C#-LINQ-and-Lambda-Expression
Simplilearn
 
Lambda Expressions in C# From Beginner To Expert - Jaliya Udagedara
Lambda Expressions in C# From Beginner To Expert - Jaliya UdagedaraLambda Expressions in C# From Beginner To Expert - Jaliya Udagedara
Lambda Expressions in C# From Beginner To Expert - Jaliya UdagedaraJaliya Udagedara
 
Functional programming
Functional programmingFunctional programming
Functional programming
Lhouceine OUHAMZA
 
Java 8 - An Overview
Java 8 - An OverviewJava 8 - An Overview
Java 8 - An Overview
Indrajit Das
 
Java 8 features
Java 8 featuresJava 8 features
Java 8 features
NexThoughts Technologies
 
Chapter - 4.pptx
Chapter - 4.pptxChapter - 4.pptx
Chapter - 4.pptx
MikialeTesfamariam
 
PYTHON-PROGRAMMING-UNIT-II (1).pptx
PYTHON-PROGRAMMING-UNIT-II (1).pptxPYTHON-PROGRAMMING-UNIT-II (1).pptx
PYTHON-PROGRAMMING-UNIT-II (1).pptx
georgejustymirobi1
 
Lambdas, Collections Framework, Stream API
Lambdas, Collections Framework, Stream APILambdas, Collections Framework, Stream API
Lambdas, Collections Framework, Stream API
Prabu U
 
Functions in Python
Functions in PythonFunctions in Python
Functions in Python
Shakti Singh Rathore
 
functions notes.pdf python functions and opp
functions notes.pdf python functions and oppfunctions notes.pdf python functions and opp
functions notes.pdf python functions and opp
KirtiGarg71
 
Working with functions in matlab
Working with functions in matlabWorking with functions in matlab
Working with functions in matlab
harman kaur
 
Python lambda functions with filter, map & reduce function
Python lambda functions with filter, map & reduce functionPython lambda functions with filter, map & reduce function
Python lambda functions with filter, map & reduce function
ARVIND PANDE
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
Mike Melusky
 
tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...
tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...
tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...
Anil Sharma
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
Mike Melusky
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
Mohammed Saleh
 
"Capture" in lambda expression.
"Capture" in lambda expression."Capture" in lambda expression.
"Capture" in lambda expression.
Lahiru Dilshan
 

Similar to Ninth session (20)

Python lambda.pptx
Python lambda.pptxPython lambda.pptx
Python lambda.pptx
 
Python Lambda Function
Python Lambda FunctionPython Lambda Function
Python Lambda Function
 
functions.pptx
functions.pptxfunctions.pptx
functions.pptx
 
C#-LINQ-and-Lambda-Expression
C#-LINQ-and-Lambda-ExpressionC#-LINQ-and-Lambda-Expression
C#-LINQ-and-Lambda-Expression
 
Lambda Expressions in C# From Beginner To Expert - Jaliya Udagedara
Lambda Expressions in C# From Beginner To Expert - Jaliya UdagedaraLambda Expressions in C# From Beginner To Expert - Jaliya Udagedara
Lambda Expressions in C# From Beginner To Expert - Jaliya Udagedara
 
Functional programming
Functional programmingFunctional programming
Functional programming
 
Java 8 - An Overview
Java 8 - An OverviewJava 8 - An Overview
Java 8 - An Overview
 
Java 8 features
Java 8 featuresJava 8 features
Java 8 features
 
Chapter - 4.pptx
Chapter - 4.pptxChapter - 4.pptx
Chapter - 4.pptx
 
PYTHON-PROGRAMMING-UNIT-II (1).pptx
PYTHON-PROGRAMMING-UNIT-II (1).pptxPYTHON-PROGRAMMING-UNIT-II (1).pptx
PYTHON-PROGRAMMING-UNIT-II (1).pptx
 
Lambdas, Collections Framework, Stream API
Lambdas, Collections Framework, Stream APILambdas, Collections Framework, Stream API
Lambdas, Collections Framework, Stream API
 
Functions in Python
Functions in PythonFunctions in Python
Functions in Python
 
functions notes.pdf python functions and opp
functions notes.pdf python functions and oppfunctions notes.pdf python functions and opp
functions notes.pdf python functions and opp
 
Working with functions in matlab
Working with functions in matlabWorking with functions in matlab
Working with functions in matlab
 
Python lambda functions with filter, map & reduce function
Python lambda functions with filter, map & reduce functionPython lambda functions with filter, map & reduce function
Python lambda functions with filter, map & reduce function
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
 
tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...
tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...
tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
"Capture" in lambda expression.
"Capture" in lambda expression."Capture" in lambda expression.
"Capture" in lambda expression.
 

More from AliMohammad155

#1 الدرس الأول من دروس مسار تعلم ال SQL Server بعنوان مخطط ال ERD والتكامل ا...
#1  الدرس الأول من دروس مسار تعلم ال SQL Server بعنوان مخطط ال ERD والتكامل ا...#1  الدرس الأول من دروس مسار تعلم ال SQL Server بعنوان مخطط ال ERD والتكامل ا...
#1 الدرس الأول من دروس مسار تعلم ال SQL Server بعنوان مخطط ال ERD والتكامل ا...
AliMohammad155
 
شرح مبسط وبسيط لمفهوم ال VLAN
شرح مبسط وبسيط لمفهوم ال VLANشرح مبسط وبسيط لمفهوم ال VLAN
شرح مبسط وبسيط لمفهوم ال VLAN
AliMohammad155
 
11th session classes diagrams
11th session classes diagrams11th session classes diagrams
11th session classes diagrams
AliMohammad155
 
10th session erd
10th session erd10th session erd
10th session erd
AliMohammad155
 
Static route and rip and ospf
Static route and rip and ospfStatic route and rip and ospf
Static route and rip and ospf
AliMohammad155
 
Ninth session software engineering sequence diagram
Ninth session software engineering sequence diagramNinth session software engineering sequence diagram
Ninth session software engineering sequence diagram
AliMohammad155
 
Routers and packet tracer
Routers and packet tracerRouters and packet tracer
Routers and packet tracer
AliMohammad155
 
Viii session activity diagram
Viii session activity diagramViii session activity diagram
Viii session activity diagram
AliMohammad155
 
OSI Model
OSI ModelOSI Model
OSI Model
AliMohammad155
 
Seventh session functional and non functional requrements & usecase example
Seventh session functional and non functional requrements & usecase exampleSeventh session functional and non functional requrements & usecase example
Seventh session functional and non functional requrements & usecase example
AliMohammad155
 
Vlsm and flsm example
Vlsm and flsm exampleVlsm and flsm example
Vlsm and flsm example
AliMohammad155
 
Sixth session software engineering usecase diagrams
Sixth session software engineering usecase diagramsSixth session software engineering usecase diagrams
Sixth session software engineering usecase diagrams
AliMohammad155
 
fifth session in networking subnetmask and subnetting
fifth session in networking subnetmask and subnettingfifth session in networking subnetmask and subnetting
fifth session in networking subnetmask and subnetting
AliMohammad155
 
functional requirements and non functional requirements
functional requirements and non functional requirementsfunctional requirements and non functional requirements
functional requirements and non functional requirements
AliMohammad155
 
fourth session of basics in networks
fourth session of basics in networksfourth session of basics in networks
fourth session of basics in networks
AliMohammad155
 
Fourth session software engineering
Fourth session software engineeringFourth session software engineering
Fourth session software engineering
AliMohammad155
 
third session of basics in networks
third session of basics in networksthird session of basics in networks
third session of basics in networks
AliMohammad155
 
Third session software engineering
Third session software engineeringThird session software engineering
Third session software engineering
AliMohammad155
 
Second session Networking (Network topology)
Second session Networking (Network topology)Second session Networking (Network topology)
Second session Networking (Network topology)
AliMohammad155
 
Second session software engineering algorithms
Second session software engineering   algorithmsSecond session software engineering   algorithms
Second session software engineering algorithms
AliMohammad155
 

More from AliMohammad155 (20)

#1 الدرس الأول من دروس مسار تعلم ال SQL Server بعنوان مخطط ال ERD والتكامل ا...
#1  الدرس الأول من دروس مسار تعلم ال SQL Server بعنوان مخطط ال ERD والتكامل ا...#1  الدرس الأول من دروس مسار تعلم ال SQL Server بعنوان مخطط ال ERD والتكامل ا...
#1 الدرس الأول من دروس مسار تعلم ال SQL Server بعنوان مخطط ال ERD والتكامل ا...
 
شرح مبسط وبسيط لمفهوم ال VLAN
شرح مبسط وبسيط لمفهوم ال VLANشرح مبسط وبسيط لمفهوم ال VLAN
شرح مبسط وبسيط لمفهوم ال VLAN
 
11th session classes diagrams
11th session classes diagrams11th session classes diagrams
11th session classes diagrams
 
10th session erd
10th session erd10th session erd
10th session erd
 
Static route and rip and ospf
Static route and rip and ospfStatic route and rip and ospf
Static route and rip and ospf
 
Ninth session software engineering sequence diagram
Ninth session software engineering sequence diagramNinth session software engineering sequence diagram
Ninth session software engineering sequence diagram
 
Routers and packet tracer
Routers and packet tracerRouters and packet tracer
Routers and packet tracer
 
Viii session activity diagram
Viii session activity diagramViii session activity diagram
Viii session activity diagram
 
OSI Model
OSI ModelOSI Model
OSI Model
 
Seventh session functional and non functional requrements & usecase example
Seventh session functional and non functional requrements & usecase exampleSeventh session functional and non functional requrements & usecase example
Seventh session functional and non functional requrements & usecase example
 
Vlsm and flsm example
Vlsm and flsm exampleVlsm and flsm example
Vlsm and flsm example
 
Sixth session software engineering usecase diagrams
Sixth session software engineering usecase diagramsSixth session software engineering usecase diagrams
Sixth session software engineering usecase diagrams
 
fifth session in networking subnetmask and subnetting
fifth session in networking subnetmask and subnettingfifth session in networking subnetmask and subnetting
fifth session in networking subnetmask and subnetting
 
functional requirements and non functional requirements
functional requirements and non functional requirementsfunctional requirements and non functional requirements
functional requirements and non functional requirements
 
fourth session of basics in networks
fourth session of basics in networksfourth session of basics in networks
fourth session of basics in networks
 
Fourth session software engineering
Fourth session software engineeringFourth session software engineering
Fourth session software engineering
 
third session of basics in networks
third session of basics in networksthird session of basics in networks
third session of basics in networks
 
Third session software engineering
Third session software engineeringThird session software engineering
Third session software engineering
 
Second session Networking (Network topology)
Second session Networking (Network topology)Second session Networking (Network topology)
Second session Networking (Network topology)
 
Second session software engineering algorithms
Second session software engineering   algorithmsSecond session software engineering   algorithms
Second session software engineering algorithms
 

Recently uploaded

Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 

Recently uploaded (20)

Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 

Ninth session

  • 2. objectives  Lambda function  Using Import keyword in Python
  • 3. Lambda Function  A lambda function is a small anonymous function.  A lambda function can take any number of arguments, but can only have one expression.  Syntax lambda arguments : expression The expression is executed and the result is returned
  • 4. Lambda Function  Example: x = lambda a : a + 10 print(x(5))  Result 15
  • 5. Lambda Function  Example: x = lambda a : a * 10 print(x(10))  Result 100  Example x = lambda a, b : a * b print(x(5, 6))  Result 30
  • 6. Why Use Lambda Functions?  The power of lambda is better shown when you use them as an anonymous function inside another function.  Say We have a function definition that takes one argument, and that argument will be multiplied with an unknown number def myfunc(n): return lambda a : a * n mydoubler = myfunc(2) print(mydoubler(11)) Result: 22
  • 7. Import in python  We use import keyword to import libraries to our code  Syntax import library_name;  We can use one method from library using from keyword from library import method1  We can use a shortcuts for library to short it’s name import library as lib  If some library has many method we need we can use (*) to import all of it from library import *
  • 8. Import in python example  Import os  import matplotlib.pyplot as pit  from sklearn import datasets  from cryptography.fernet import *