I have a dict which I want to sort by their values. After that I want the order of the keys to be put in an array. I tried some code, but all just output the values if It was sorted by the values or the keys if it was sorted by the keys. This is my dict:
{0: 1.0, 1: 22.0, 2: 30.0, 3: 8.0, 4: 17.0, 5: 9.0, 6: 13.0, 7: 21.0, 8:
24.0, 9: 18.0, 10: 14.0, 11: 2.0, 12: 20.0, 13: 23.0, 14: 19.0, 15: 15.0, 16:
6.0, 17: 26.0, 18: 11.0, 19: 5.0, 20: 29.0, 21: 7.0, 22: 12.0, 23: 27.0, 24:
25.0, 25: 16.0, 26: 3.0, 27: 4.0, 28: 28.0, 29: 10.0}
It should return something like this:
[0,11,26,27,19,16, etc]