Python execution time import time start = time.time() "the code you want to test stays here" end = time.time() print(end - start) Reference How to measure the execution time of a Python script