Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This is 0.4ms shorter on average.
@TielaRose - In Python you can use the
timeit
module to test the time taken to run anything you are interested in.Here is a good StackOverflow post where the topic is introduced (with some explanation of what the module actually does):
https://stackoverflow.com/questions/17579357/time-time-vs-timeit-timeit
and then this is the Python Docs page https://docs.python.org/3/library/timeit.html
Then you can just google stuff like "examples with Python timeit" and see how people build their tests (and make nice graphs if you want to be fancy).
Newbie question: how do you know or find out what is faster?
Indeed I used it too
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Reversed is much faster :)
And probably more readable
This comment is hidden because it contains spoiler information about the solution