Basically, I have a dictionary that I want to transform into a list of lists (with each component list consisting of the key and value from the dictionary).
The reason I am doing this is so that I can iterate through this new list with a for loop and do something with both the key and the value. If there is an easier way to do this, I am open to suggestions.
This will iterate through the dictionary, storing each key in
keyand each value invalue.See the docs.