Question about timeit module in python
Question: I have a question about the timeit module in python, which is used to
determine the time it takes for a piece of code to execute.

    
    
    t = timeit.Timer("foo","from __main__ import foo")
    str(t.timeit(1000))
    

What is the meaning of the argument 1000 in the above code ?


Answer: From the
[documentation](http://docs.python.org/library/timeit.html#timeit.Timer.timeit):

>
>     Timer.timeit([number=1000000])
>  
>
> Time `number` executions of the main statement. This executes the setup
> statement once, and then returns the time it takes to execute the main
> statement a number of times, measured in seconds as a float. The argument is
> the number of times through the loop, defaulting to one million. The main
> statement, the setup statement and the timer function to be used are passed
> to the constructor.

