def func(x): if x>=3: return x y = filter(func, (1,2,3,4)) print(y) print(list(y))
def function(a): return a*a x = map(function, (1,2,3,4)) #x is the map object print(x) print(set(x))
{16, 1, 4, 9}