Latest web development tutorials

Python inclui exercícios 92

Python 100 Li Python 100 Li

Título: Exemplo 2 funções de tempo.

Análise do Programa: Nenhum.

Source Code:

#!/usr/bin/python
# -*- coding: UTF-8 -*-

if __name__ == '__main__':
    import time
    start = time.time()
    for i in range(3000):
        print i
    end = time.time()

    print end - start

O exemplo acima saída é:

0
1
2
3
4
……

Python 100 Li Python 100 Li