Wednesday 12 July 2017

42 dictionary In python


aaaa
import functools
list1=[23,2,6]
listz=functools.reduce(lambda x,y:x+y,list1)
print(listz)

'''
list1=[23,2,4,5,9,91,87,33]
listz=list(filter(lambda x:x>9,list1))
print(listz)
'''


"""
list1=[23,2,4,5,9,91]
z=list(map(lambda x:x+7,list1))
print(z)
"""

'''
list1=[22,2,4,5,9,(3,4,5)]
print(list1[5][2])
'''
 

No comments:

Post a Comment