<p dir="ltr">Thank you ,  this answers my question  : )<br>
On Apr 22, 2015 6:39 PM, "Michael Torrie" <<a href="mailto:torriem@gmail.com">torriem@gmail.com</a>> wrote:<br>
><br>
> On 04/21/2015 09:31 PM, Ganesh Pal wrote:<br>
> > Iam not able to understand what  why only 10 loops were run ? what<br>
> > does this mean and how  does this work ?<br>
><br>
> I have a hunch you're mistakenly thinking that Python is only running<br>
> through ten iterations of your for i in range(1000000) loop.  This is<br>
> not the case.  The entire thing is running (all 1000000 iterations of<br>
> your loop), but is run ten times, as that is the default for timeit<br>
> unless you specify that you want to run it more times.  Hope this helps.<br>
><br>
> Basically timeit is doing something like this:<br>
><br>
> def mycode():<br>
>     for i in range(1000000):<br>
>         pass<br>
><br>
> for x in range(10):<br>
>      mycode()<br>
><br>
> And then collecting timing statistics on the ten passes.<br>
> --<br>
> <a href="https://mail.python.org/mailman/listinfo/python-list">https://mail.python.org/mailman/listinfo/python-list</a><br>
</p>