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.
This solution was written in Python 2. It does not work because Py2 is deprecated. It needs certain adaptation to Py3 to work with the test cases again.
Cool, would be even better if that would work for every case, it seems like it won't work anymore against the tests, now tests covers this case, I've just checked because I was curious ^^
solve in 3 lines what i spent 3 days to solve. respect!
3 lines. Respect
respect!
Yes, I think you guessed right. If
f
is an empty filter object (list(f) == []
), then in Python 3bool(f)
returnsTrue
which is why you do not get what you expected.This comment is hidden because it contains spoiler information about the solution
Third line checks if there are any columns, rows or blocks which are not a set of numbers from 1 to 9.
Second line helps define blocks.
Does this help you? You can ask more specific questions if you are missing something.
Could someone explain the idea of this solution? Thanks!
Aside from the concatenation issue on zip(*board), it returns False when a solution is True..
can't seem to figure out a fix in Python 3
If I remember right, the solution was written in Python 2. In that version of Python zip() returns a list. In Python 3 zip() returns a zip object instead, so you will need to convert it into list in order to concatenate it with lists.
board + [*zip(*board)] + blocks
can help resolve this.This comment is hidden because it contains spoiler information about the solution
This truly is a beautiful solution. I am particularly intrigued by the nested list comprehension, gonna need to write it out as a set of for loops to grok it in fullness, I think, but I would definitely not object to one of you discussing it at length. :)
no (and think about the spoiler flag, plz)
This comment is hidden because it contains spoiler information about the solution
Loading more items...