In [2]:
list_of_nums = [1,2,3,4]
In [4]:
new_list = filter(lambda x: x%2==0,list_of_nums)
In [5]:
print new_list
In [6]:
map_list = map(lambda x: x%2==0,list_of_nums)
In [8]:
map_list
Out[8]:
In [9]:
third_list = lambda x: x&2==0,list_of_nums
In [10]:
third_list
Out[10]:
In [23]:
x =1
y=2
num = (lambda x,y: x+y)
In [25]:
num(1,2)
Out[25]:
In [24]:
num
Out[24]:
In [ ]: