How To Use Python Timeit (Simple Example)

Publicado em: 16 Setembro 2022
no canal de: Make That Work
100
3

Timing your code is a useful capability to have.

In this video we use timeit to measure the amount of time two functions take to execute.

The two functions are two ways of building up a list in Python: a for loop and a list comprehension. We can compare the execution time to see what is faster. Spoiler alert: the list comprehension function was faster!

Give it a go in your own code!


Nesta página do site você pode assistir ao vídeo on-line How To Use Python Timeit (Simple Example) duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Make That Work 16 Setembro 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 100 vezes e gostou 3 espectadores. Boa visualização!