News

This is where the 'timeit' module comes in handy. It's a built-in Python library that allows you to measure the execution time of your code snippets.
python -m timeit "for n in range (100):pass " On the whole, though, it’s easier to use the technique shown above, since you don’t need to awkwardly shoehorn your code into a text string.