Mega Code Archive
Categories
/
Python Tutorial
/
Buildin Function
Map(function, sequence) calls function(item) for each of the sequences items and returns a list of the return values
def cube(x): return x*x*x print map(cube, range(1, 11))