datetime python calculating runtime code example
Example: use datetime python to get runtime
from datetime import datetime
start = datetime.now()
# code ...
print(datetime.now()-start)
from datetime import datetime
start = datetime.now()
# code ...
print(datetime.now()-start)