Answers for "how to speed up a program in python"

1

how to find the speed of a python program

import time
t0= time.clock()
print("Hello")
t1 = time.clock() - t0
print("Time elapsed: ", t1 - t0) # CPU seconds elapsed (floating point)
Posted by: Guest on May-06-2021
0

how to do speed test with python

import os
#this command will install speedtest-cli
#after one time use comment this next line |
os.system("pip install speedtest-cli")#<---|
os.system("speedtest-cli")
Posted by: Guest on October-27-2021

Python Answers by Framework

Browse Popular Code Answers by Language