Possible Duplicate:
Python: For each list element apply a function across the list
for example, let's say I have an array or list
myList = [a,b,c,d]
and I have a function that generates a random number.
How do I go through the list and have each of the item in that list receives the random number generated by the function and be added to the item?
So, say 'a' is the 1st in the list, 'a' goes into the function where a random number (let's say 5), is generated and adds itself to 'a' the result should be `[a+5, b+.......].