This example doesn't test for absence of any other elements, so it's not as precise.
That said, I largely agree with you - checking for this exact example from the README file works much better (and IMO more readable) as:
assert set(result) == {"a", "b"}
The precisely example doesn't even check if the result is a list, so it can be anything.