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.
Yo, i'm getting a strange error on this.
I'm pulling the last char of the String using the index s[-1]
but i got a string index out of range error.
I'm assuming that this means it's testing using a null or empty string at some point, which is kind of cheeky.
One could assume that you'll always be passed a string with Something in it right?
I know, i know. validate your inputs. But still, after passing all tests and still getting an error, it's a bit frustrating.
-traceback below-
Traceback (most recent call last):
File "tests.py", line 17, in
test.assert_equals(remove(inp), exp)
File "/workspace/default/solution.py", line 2, in remove
if (s[-1] == '!'):
IndexError: string index out of range
This comment is hidden because it contains spoiler information about the solution