01 / 07
It is the keys that come round
Hand a list to for and the contents came out in turn. Hand it a dictionary and what comes out is — the keys.
Not the values. Everyone is caught out by this once, so say it out loud: the keys are what come round.
prices = {"apple": 120, "orange": 80}for key in prices: print(key)Result
apple orange