Encuentre el tiempo de ejecución para el código Python
import time
start_time = time.time()
main()
print("--- %s seconds ---" % (time.time() - start_time))
Tanishq Vyas
import time
start_time = time.time()
main()
print("--- %s seconds ---" % (time.time() - start_time))
import time
start = time.process_time()
# your code here
print(time.process_time() - start)
import time
startTime = time.time()
endTime = time.time() - startTime