<p>How do I run a function on a loop so all the results go straight into a list and is there a way to run a function which acts on all the values in a list?</p>

This example shows how to do it (run it in an interpreter)
```
```
>>> def square(x):
...  return x*x
...
>>> a = [1,2,3,4,5,6,7,8,9]

>>> map(square,a)
[1, 4, 9, 16, 25, 36, 49, 64, 81]
```
```