time a line of code python
import time
start = time.process_time()
# your code here
print(time.process_time() - start)
Source: stackoverflow.com
import time
start = time.process_time()
# your code here
print(time.process_time() - start)