Skip to content

Python code snippet – How to calculate the time?

import time
start_time = time.time()
main()
print("--- %s seconds ---" % (time.time() - start_time))
See also  Python code snippet - How to fill an array with consecutive numbers?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.