Map: lambda function inside : map « Buildin Function « Python






Map: lambda function inside

Map: lambda function inside


foo = [2, 18, 9, 22, 17, 24, 8, 12, 27]
 
print map(lambda x: x * 2 + 10, foo)


           
       








Related examples in the same category

1.Do a map on list Do a map on list
2.A sentence is split up into a list of wordsA sentence is split up into a list of words
3.Functional Programming Tools: mapFunctional Programming Tools: map
4.Functional Programming Tools: map: More than one sequence may be passedFunctional Programming Tools: map: More than one sequence may be passed
5.Use mapUse map