check how long a python file takes to execute code example
Example: how to time a python script
from datetime import datetime
start = datetime.now()
# some kind of code
print(datetime.now() - start)
from datetime import datetime
start = datetime.now()
# some kind of code
print(datetime.now() - start)