Writing clean code is more important than writing clever code.
Saw code in my IDE decided to restructure it..
With a quick glance at the function and parameter name, is it not obvious that the function takes a year and returns the century it is in?
This comment is hidden because it contains spoiler information about the solution
Nice and clear.
(except it's very inefficient: compare to lechevalier's solution)
Bravo ! Best for me.
This isn't really best practice. It's more like, shortest code.
I really do learn a lot looking at these solutions and comparing them to mine.
Please use spoiler flag next time.
You are right that it can not solve all sudokus - BUT the Kata explicitly states that it need only solve easy sudokus.
"...The Sudokus tested against your function will be "easy" (i.e. determinable; there will be no need to assume and test possibilities on unknowns) and can be solved with a brute-force approach...."
It works for the test cases, hence solves the Kata.
If I understand this solution correctly, then your function does not work for hard sudoku's!
It can happen that you won't find len(use) == 1 anywhere. Solving the sudoku would then require some trial-and-error, which your function doesn't do
I guess it is way more efficient than mine, since my is 14 lines and has 4 conditions.
But in rare ocasions that website domain ends with 'www', mine works. Mine also can work with subdomains if you change the index in the return statement from 0 to -2