python3 -m timeit 'x = [i for i in range(100)]'

Category: Python & pip

python3 -m timeit 'x = [i for i in range(100)]'

Time a Python statement with the timeit module

Measures how long a Python statement takes to execute, averaging over many runs.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.