how to calculate time take to run a function in python code example
Example: find time of run for python code
import time
start_time = time.time()
main()
print("--- %s seconds ---" % (time.time() - start_time))
import time
start_time = time.time()
main()
print("--- %s seconds ---" % (time.time() - start_time))