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.
Thank you for the helpful advice. This will be very useful for me in the following exercises.
My code passed "TEST" but failed "ATTEMPT". Some of the tests in "ATTEMPT" returned an error:
{'pos': [2, 5, 8], 'peaks': [20, 12, 20]} should equal {'pos': [2, 5, 8, 11], 'peaks': [20, 12, 20, 12]}
The problem is that in "ATTEMPT", the error messages do not contain the input data. Which makes it very difficult to understand what exactly is not working correctly in my code. Please improve the error message in "ATTEMPT". So that the student can see exactly which input data was passed to the code.
A good solution is to insert letters from the alphabet. It's easier than messing with sorting and other stuff. A simple and effective solution.👍
Writing everything in one line is a bad practice. It's just bragging about its tricky hardcore solution. It's too bad that many people called this solution "best practice" and "clever". This is a bad practice. And the solution is not smart, but abstruse and overcomplicated.
The solution from fortlasagna is much better. He generally does the same thing. But his code is much better structured and much better readable. Here he really shows the best practice.