Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

lambda functions

-----------------------------
are anonomous functions - they dont hvae any names
they are used to achieve small tasks
we cannot have control flow statements like if else while etc in lambda functions
they are single line functions
return type of a lambda function is a function
they are faster than traditional functions
return type of a lambda function is a function

syntax
function_name = lambda input arguments : return value

map / reduce/ filter

map - takes one by one each input and pass it to a function to process
- number of inputs is same as number o/ps
- in ver 2.x of python map returns a list
- in ver 3.x map returns an object we need to type cast to list
synatx

ans = list(map(fun_name , input_container))

filter - returns a single value


in ver 2.x its directly present
in ver 3.x its a part of functools library

python first.py & ->

fg job id

ps -ef - all the processes running

sh 1238

open shell 1238 and make changes there

homework-

read more about regular expressions, oops concepts, exception handling

You might also like