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.
It's a horrible idea to use try/except for completely preventable exceptions.
It's slow af. Your asymptotic time complexity is just horrible... It's
O(n^3)
.A bad solution on this problem is normally "just"
O(n²)
... (my solution isO(n)
)Same, I used title() and didn't realize that was more for an entire string.
Thanks!
if you subtract 97 inside the first expression, yes
edit: errr... not sure what you really mean. Let's say, there is a link, yes
Because you're passing a list with a string inside there and here the input is a string. And no, it returns a list with a string inside, not a string, do you see the
[]
there?What are you using that loop for? That code is not even returning a string. Do you see why it's wrong now?
Sorry, but I don't get what
a
is in the first code, maybe you meants
there? You're returning a list in that case and it'll break with some input value. The last code is ok.Because you're not doing what the kata asks, read the instructions again, it is much more simpler than you think.
Also, Python code without indentation, is very hard to read, please, use markdown formatting when posting code.