I am trying to iterate over a multidimensional list in Python but it is not acting as I would expect.
POIs = {'GTA': {'areas': [{'lat': 43.7, 'range': '40km', 'long': -79.416}]}, 'Montreal': {'areas': [{'lat': 45.509, 'range': '40km', 'long': -73.588}]}}
for POI in POIs:
print POI
This returns strings
GTA
Montreal
If I did a similar thing using .each in Ruby it would pass the hash. Is there a fundamental difference in how Python and Ruby deal with array loops? Or is there a better way to try and achieve .each style iteration in Python?