I would like to know how I can loop over a Python dictionary without first and last element. My keys doesn't start at 1 so I can't use len(capitals)
>>> capitals = {'15':'Paris', '16':'New York', '17':'Berlin', '18':'Brasilia', '19':'Moscou'}
>>> for city in capitals:
>>> print(city)
Paris
New York
Berlin
Brasilia
Moscou
I would like this result:
New York
Berlin
Brasilia
My keys doesn't start at 1 so I can't use len(capitals)