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.
Check this out: https://www.w3schools.com/python/python_for_loops.asp see what the example with the string
"banana"
prints.Now try this out, that's basically what you're trying to do with your code:
And see it'll fail with the same error that you get here.
It doesn't work because it's wrong. And it won't work anywhere. Not a kata issue.
Because
i
is not a number. Please stop right now. Go read the Troubleshooting section of the docs I told you.Read this: https://docs.codewars.com/training/troubleshooting/
About your problem:
i
is a string there (a single char), you can't usetext[i]
to access a single letter of the string, neitheri+1
makes sense.Look better at what they did, so you see how to correct your code.
That's a problem with your code and not a kata issue, again. Please, don't open issues every single time your code doesn't work if you're not sure if the problem is in the kata and not in your code. It's as the error says: string indices must be integers.
No, they shouldn't. What is
i
there? Your code being wrong is not a kata issue.