There should be more random tests (~ 100). Random tests shold always cover both valid and invalid (no path) cases.
Returning different types (list/bool) is bad practice. When there isn't a path the function shopuld return a "no-value" (None in python) or raise an exception.
None
in python) or raise an exception.The assertion messages should provide information about what was wrong (see the docs).
As dfhwze noted, this isn't likely to be approved, but it's good to know for another kata.
This comment is hidden because it contains spoiler information about the solution