1>>> from string import upper
2>>> mylis=['this is test', 'another test']
3>>> map(upper, mylis)
4['THIS IS TEST', 'ANOTHER TEST']
1# N. B. myfunction must be able to take as argument the elements of the list
2
3def myfunction(x):
4 # process x
5 return #some results
6
7# declare your list
8l1 = list(...)
9
10# get a list with the transformed values according to myfunction
11l2 = list(map(myfunction, l1))