Search code examples
pythontimer

What are some practical applications for adding a timer to your python code?


I'm new to Python and trying to apply the lessons being taught (online) but unfortunately, I don't understand why they are asking for timer code. In your experience, why have you added timer code to your program? Can you give me some practical examples so I can better understand why?

Sorry if it's a dumb question - TIA.


Solution

  • Timers are often added in lesson code to show the difference between different coding options. i.e., there are more than one ways to do it, but which is fastest? You wouldn't run the code in production.