I have a set of objects of questions and answers and I need to return all possible combinations of each question and answer in a set of dictionaries. I am new to Python and have done some Google-ing but I don't think I know enough to even know how to search correctly.
Test has a one to many relationship to Question
Question has an id and string containing the actual question
Question has a one to many relationship to Answer
Answer has an id and string containing the actual Answer
So if there was two questions, first one with answers a and b, second with c and d,
the result set would be [{1:a,2:c},{1:a,2:d},{1:b,2:c},{1:b,2:d}]
Any help is greatly appreciated!