Let’s consider this dictionary
>>> test = {'to have': True, 'to get': False, 'having': False}
Imagine
>>> test.random_order()
{'having': False, 'to get': False, 'to have': True}
How can I reorder it randomly? Should I use OrderedDict and random.shuffle? If so, how can I combine them?
Just shuffle the key/value pairs (items) and pass them on to
OrderedDict: