I'm attempting to reorder the values of a particular key in a python dictionary.
For instance, if a I have dictionary {'a':"hello","hey","hi"}
When i print the values of 'a', how could I change the order of "hello", "hey", or "hi"?
I'm attempting to reorder the values of a particular key in a python dictionary.
For instance, if a I have dictionary {'a':"hello","hey","hi"}
When i print the values of 'a', how could I change the order of "hello", "hey", or "hi"?
To rephrase this: the value of your key 'a' in your dictionary is a list containing 3 string-objects.
dict = { 'a': [ "hello", "hey", "hi" ] }
this being the case, you can sort the list like this