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.
I have the same problem.
Can you give me a hint please?
UPD.: Solved.
They are easier to read if you are new to python but I assure you that I would rather read this code than an equivalent 6 lines solution anytime.
Good solution but difficult to read. Standard for loops are more easy to read and understand.
This comment is hidden because it contains spoiler information about the solution
Okay then, this means the issue is resolved, I suppose.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The test with [s, s, s, t, n, s, s, s, t, s, n, s, s, s, t, t, n, s, t, s, n, t, n, s, t, n, n, n] is incorrect. It expects an index error (In python i'm throwing an Exception() to no avail) however you wont get an index error because there is a bad number. it reads 1, 2, 3 onto the stack and tries to duplicate but when reading the number after the duplicate command there is only '\n' which is supposed to be an error according to the description. I'm not sure where to go from here because while I do throw an exception the description for the test is wrong and its failing. Am I just missing something?
I like this solution. I had to go back and play with it a bit. Well done.