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.
Python doesn't have arrays and the code above isn't creating a list either. It's creating a generator and the creation specifically takes almost no resource, since the values are generated lazily.
AFAIK the difference comes from the code above calling isdigit function a lot of times, whereas replace is only called 10 times. Keep in mind, that both of the functions are highly optimized and written in C, so that's why the the code with more function calls and more python is slower. That also for example causes some O(n^2) algorithms to run faster in python, than an O(n log n) alternative.
Nice mathy kata, perfect.
Approved
python new test framework is required. updated in this fork
This should not pass.
atleast python: no random tests
python new test framework is required. updated in this fork
yeah I used .isnumeric lol
Thank you so much @stok
Bc creatin new array is more time and resource consuming. Using regex is BP for this case. My advise for everyone: learn what is regix (import re) and how to use it
Yes!!!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
While this does pass the tests, if an array is used with no stray value, this will error with an IndexError.
Loading more items...