Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
256 B
2
Indexable
Never
def cube(a):
    return a*a*a

l = [1,2,3,4,5,6,7,8,9,10]
newl = []
for items in l :
    newl.append(cube(items))

print(newl) 

print(list(filter(lambda x: x > 100 ,newl)))

from functools import reduce 

print(reduce(lambda x ,y :(x+y),l ))
Leave a Comment