Matt wrote:
Hey everyone,

First post to this list. I hope I'm doing it right.

Let's say I want to run func 10 times Is there a more pythonic way to do it 
than this:
for i in xrange(10):
 func()

no, that looks fine for your requirement.

What may be a bit weird here is the requirement to run the same function 10 times without further input/output parameters. I have never needed such a construct.
What kind of function do you have that needs to be called 10 times?


If you are doing timing experiments, the timeit library has a way of repeating the same experiment a number of times.


Albert
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to