How to measure the elapsed time in Python 2023-03-13 68 words - 1 min read Option 1 - using the time module 1 2 3 4 5 6 7 8 import time start = time.time() print(23*2.3) end = time.time() print(end - start) Output: 1 2 52.9 3.600120544433594e-05 Option 2 - using the timeit module 1 2 3 4 5 6 7 8 from timeit import default_timer as timer start = timer() print(23*2.3) end = timer() print(end - start) Output: 1 2 52.9 6.355400000000039e-05