Remove dict.keys() when not need it

In a for loop over a dictionary we don't need to use the `keys`
methods.