If you want to measure the execution time of small code snippets on your terminal, use python -m timeit. Find an example of timeit in the image above.
python -m timeit
Link to the source code.