Why is there no .keys() or list(dictionary_name) in the question?

I’m in the process of taking the quiz for the dictionary lesson and got stuck on this question

oscars = {"Best Picture": "Moonlight", "Best Actor": "Casey Affleck", "Best Actress": "Emma Stone", "Animated Feature": "Zootopia"}

for element in oscars:

The answer to this was that it prints each key. I thought that in order to get the keys, we had to use either .keys() or list(dictionary_name)

By default when unpacking a dictionary using a for loop in python it returns the keys in the dict. The .key() method is used when we need a list of the keys in the dictionary. For iterating over a object there is a built in function called iter() (surrounded with double underscores in start and in end) in python. This function for dictionaries returns the keys. So the output using the .keys() method or the method you used in your code are correct. When you will code more in python, you will yourself understand when to use .keys() and when to use the dictionary name itself.
I hope you understood.
Happy Coding! :grinning: