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.
Your code is wrong, print the input and figure out why. One of the things that are wrong in your code is, why are you saying that going twice in a direction should return
False
?There are random tests which are different with each running of the code. As for the test you just showed, what's quite likely is that you are misreading one test result for another in the the logs. For certain, this kata has been thoroughly vetted, and especially so in Python. Notice that over 18K people have solved it in python. If you want, you can post your code with a spoiler tag and use proper code markdown, so someone can maybe help you figure this out.
yes it works.
hint: don't try to "reason" about the specs, just apply them precisely like they are given. You're currently trying to use shortcuts, and that's what makes your code fail. You're reinventing the specifications without realizing it.(edit: I was thinking about g964's kata, not this one, sorry 'x) )=> what's your current problem exactly?
also: don't forget to always use the spoiler tag when discussing code. (I have added the tag for you)
the previous two posts were about the same thing: Py 2 vs. Py 3