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 comment is hidden because it contains spoiler information about the solution
To OP: Please mark your post as having spoiler content next time.
That's because you have a subtle error in your logic: your code will return in the first iteration of the loop. Your code translates to something similar to: if this, return this, else return that (first iteration). By adjusting your overall structure (which in this case, is just modifying number of tabs/spaces for some line(s)), your code will pass.
This comment is hidden because it contains spoiler information about the solution
Thanks for your reply! I didn't have full understanding of how loops work. It's great that here I can find help from more experienced users
I was doing something similar and getting the same error. Then added some print functions to try and see what was going on and realised it wasn't doing as many loops as expected. Then realised this is because you are deleting items from the list being iterated, so when it completes a loop where it deletes an item, the list shortens and the next item in the list goes to the current index and it moves to the next iteration if there is one.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution