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”?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To rephrase this: the value of your key ‘a’ in your dictionary is a list containing 3 string-objects.
this being the case, you can sort the list like this