Do you want to make pairs (key, value)? Here is the code for generating a list (key, value) of tuples ...
thelist = [(key, genreOptions[key]) for key in genreOptions]
Ahh, I see that a more efficient answer is higher ...
thelist = genreDictionary.items()
But I want to include an example of understanding the list anyway :)
2rs2ts
source share