Best way to time algorithms in Python

There are tons of ways to calculate elapsed time (in seconds) for Python code. But which is the best way? So far, I find that the “timeit” method …

Best way to time algorithms in Python