Take a look at the itertools-module and, in particular, the product method
usage example:
for i in itertools.product(range(0,100), repeat=3):
Note that a function call can be shortened to:
list.append(run(*i))
in the above example. see docs.python.org for an explanation of unpacking argument lists.
As an example, the output from product(range(0,2), repeat=3))
as follows:
(0, 0, 0) (0, 0, 1) (0, 1, 0) (0, 1, 1) (1, 0, 0) (1, 0, 1) (1, 1, 0) (1, 1, 1)
source share