x = {'Color': ['Red', 'Yellow'], 'Size': ['Small', 'Medium', 'Large']}
keys = list(x.keys())
values = list(x.values())
matrix = []
for i in range(len(keys)):
    cur_list = []
for j in range(len(values[i])):
    cur_list.append({keys[i]: values[i][j]})
matrix.append(cur_list)
y = []
for i in matrix[0]:
    for j in matrix[1]:
        y.append(dict(list(i.items()) + list(j.items())))
print(y)
Combine Python Dictionary Permutations into List of Dictionaries