The simplest way to do it is to put:
import time
start_time = time.time()
at the start and
print "My program took", time.time() - start_time, "to run"
at the end.
The simplest way to do it is to put:
import time
start_time = time.time()
at the start and
print "My program took", time.time() - start_time, "to run"
at the end.