Given the following dictionary in python.
dict = {'site1': {'status': 200}, 'site2': {'status': 200}, 'site3': {'status': 200}}
How can I iterate and access the values of a sub dictionary?
for sub in dict.items():
print(sub["status"])
gives error: tuple indices must be integers or slices, not str
Desired outcome: print 3 strings indicating site status for each sub dict.
for site_name, data in dict.items():...