Untitled
Anonymous
plain_text
03/15/2024 1:35 PM
344 B
18
Indexable
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 ))Editor is loading...
Leave a Comment