Hi, I have tried multiple ways to print this but came up stumped:
I want to print the key value pairs in the following dictionary, I can do it with no problems formatting it just as a dictionary, however I am stumped trying to do it from a list. I can print individual entries but can’t get further than that with a loop etc… any help apreciated.
users = [{‘index’: 3, ‘name’:‘Dave’, ‘town’:‘Bham’}, {‘index’: 2, ‘name’:‘Alan’, ‘town’:‘Manchester’}]
so that the output looks like this:
index: 3
name: Dave
town: Bham
index: 2
name: Alan
town: Manchester