Removes `.keys()`, it’s always slower when you don’t specifically need a list.

 `k in d` is way faster than `k in d.keys()`: the keys are hashed in a dict or a set, not in a list.
 And `.keys()` also means 3 additional steps: an attribute lookup, a method call, and a list creation.