KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Given a dictionary that looks like this: { 'Color': ['Red', 'Yellow'], 'Size': ['Small', 'Medium', 'Large'] } How can I create a list of dictionaries that combines the various values of the first dictionary's keys? What I want is: [ {'Color': 'Red', 'Size': 'Small'}, {'Color': 'Red', 'Size': 'Medium'}, {'Color': 'Red', 'Size': 'Large'}, {'Color': 'Yellow', 'Size': 'Small'}, {'Color': 'Yellow', 'Size': 'Medium'}, {'Color': 'Yellow', 'Size': 'Large'} ]
Tags (comma-separated)
Save Edits
Cancel