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.
Sorry, you're right. The tests could be improved in order not to crash, but the problem is you return a
bool
when you should return alist
. The test crashes because it tries to apply a slice to your answer, which wouldn't happen with a list. It doesn't say tests fails because the test doesn't finish (it crashes).It's hard to help you without knowing your code, but the log is explicit: on line 18 of your code, you try to apply subscript to
actual
(subscript means you try to access an index slice, here using[:-1 ], [1:]
) to abool
object (which meansactual
isTrue
orFalse
). This is not possible (True[:-1]
doesn't make sense), so your code crashes.The official documentation can help you: https://docs.codewars.com/training/troubleshooting/