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 out the Python docs, especially the "Important warning!"
Change the last lines of your code to this:
You can run it in https://programiz.pro/ide/python and you will see how your function returns
False
twice, while the second input should result inTrue
.It really does not. It's problem with the tests you do in other interpreters. Your tests are incomplete.
Codewars uses exactly the same Python as other places, you just perform your tests incorrectly. The
prev = [(0,0)]
part in your function introduces a subtle bug which does not manifest in other environments because your tests are incomplete. Try running your solution twice in any other place and you will notice the same problem.Your solution has a bug, it's not a problem with Codewars' Python.