Functional Programming Tools: map : map : Buildin Function : Python examples (example source code) Organized by topic

C++
PHP
Python


Python  »  Buildin Function   » [  map  ]  Screenshots 
 



Functional Programming Tools: map



"map(function, sequence)" calls function(itemfor each of the sequence's 
# items and returns a list of the return values. For example, to compute some 
# cubes:

def cube(x)return x*x*x

print map(cube, range(111))
           
       
Related examples in the same category
1.  Do a map on list Do a map on list
2.  Map: lambda function inside Map: lambda function inside
3.  A sentence is split up into a list of words A sentence is split up into a list of words
4.  Functional Programming Tools: map: More than one sequence may be passed Functional Programming Tools: map: More than one sequence may be passed
5.  Use map Use map
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.