Answers for "measure time run python"

12

python measure time

import time

start = time.time()
print("hello")
end = time.time()
print(end - start)
Posted by: Guest on March-24-2020
0

how to calculate running time in python

import timeit

start = timeit.default_timer()

#Your statements here

stop = timeit.default_timer()

print('Time: ', stop - start)
Posted by: Guest on January-21-2022

Python Answers by Framework

Browse Popular Code Answers by Language