Answers for "calc running time of pytohno"

2

python calculate time taken

import time
start = time.process_time()
# your code here    
print(time.process_time() - start)
Posted by: Guest on June-03-2020
1

use datetime python to get runtime

from datetime import datetime

start = datetime.now()
# code ...
print(datetime.now()-start)
Posted by: Guest on October-23-2020

Python Answers by Framework

Browse Popular Code Answers by Language