This may be a silly question, but given the following dict:
combination_dict = {"one": [1, 2, 3], "two": [2, 3, 4], "three": [3, 4, 5]}
How would I achieve this list:
result_list = [{"one": [1, 2, 3], "two": [2, 3, 4]}, {"one": [1, 2, 3], "three": [3, 4, 5]}, {"two": [2, 3, 4], "three": [3, 4, 5]}]
In other words, I want all combinations of two key/value pairs in a dict without replacement, irrespective of order.
One solution is to use
itertools.combinations():Edit: Due to popular demand, here a Python 3.x version: