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.
OP solved it, closing. (Your initial code will not work for odd number of chained calls)
This comment is hidden because it contains spoiler information about the solution
What is the added value of defaultdict in this scenario?
same! :D
In one line but for what price... The code is terribly inefficient. Your solution has more lines but it is faster and cleaner.
Absolutely not best practice. Number of instances of one character is something you can very easily do with just one iteration over the string. This code goes over the entire string for each character unnecessarily.
I really wish newbies shifted their efforts from making "fancy" one-liners with terrible efficiency to writing actual respectable pieces of code. And I also wish people stopped upvoting codes like these as "Clever" or even "Best Practices".
i forgot about that method, pretty cool how python makes your life super easy.
Feels so good to crack the most optimal solution
This comment is hidden because it contains spoiler information about the solution
Man, thx for showing me the other way to solve this problem. The way you use enumerate is genius!
I agree. Replace "/" with "//" and this solution is pretty close to perfect.
This comment is hidden because it contains spoiler information about the solution
Nice
literally lolll. is it possible to do a 1kyu in one line? i wonder
Or nearly 30 guys
Loading more items...