Ad
  • Custom User Avatar

    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 a list. 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).

  • Custom User Avatar

    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 a bool object (which means actual is True or False). 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/