[Tutor] str.split and quotes

Kent Johnson kent37 at tds.net
Sat Apr 9 17:17:41 CEST 2005

Alberto Troiano wrote:
> Sorry to bother you that much. I know I have a lot to learn yet but I 
> hope you can teach me.
> I see that someone posted something about running functions with a 
> timer. How can I do this???

You can use the timeit module, see my recent post for an example.

You can also use time.time() directly like this:
import time
start = time.time()
# do something that you want to time...
elapsed = time.time() - start

now elapsed is the elapsed time in seconds as a floating point number.


More information about the Tutor mailing list