I have a dictionary of Arrays in Python such that
dictionary={a:[1,2,3,4],b:[2,3,4,8],c:[3,5,6,5]}
and so on and so on
I've already sorted the dictionary so that it is now sorted by the fourth item of every array so the order goes b,c,a
dictionary=sorted(dictionary.values(),key=itemgetter(3),reverse=True)
The problem is, when I try to iterate through the keys, it shoots out the key as the array itself.
for key in dictionary:
print(key)
prints out [2,3,4,8], however, I want it to iterate through b,c,a in that order.
Is there an easy way to do this?