dicionario = {
(0,0,0): ['0, 0, 0'],
(0,0,1): ['0, 0, 1'],
(0,0,2): ['0, 0, 2'],
(0,0,5): ['0, 0, 5'],
(0,1,0): ['0, 1, 0']
}
indices = sorted(dicionario.keys(), key = lambda item: item[2])
for i in indices:
print(i, dicionario[i])
ZGljaW9uYXJpbyA9IHsKICAgICgwLDAsMCk6IFsnMCwgMCwgMCddLAogICAgKDAsMCwxKTogWycwLCAwLCAxJ10sCiAgICAoMCwwLDIpOiBbJzAsIDAsIDInXSwKICAgICgwLDAsNSk6IFsnMCwgMCwgNSddLAogICAgKDAsMSwwKTogWycwLCAxLCAwJ10KfQoKaW5kaWNlcyA9IHNvcnRlZChkaWNpb25hcmlvLmtleXMoKSwga2V5ID0gbGFtYmRhIGl0ZW06IGl0ZW1bMl0pCgpmb3IgaSBpbiBpbmRpY2VzOgogICAgcHJpbnQoaSwgZGljaW9uYXJpb1tpXSk=
(0, 1, 0) ['0, 1, 0']
(0, 0, 0) ['0, 0, 0']
(0, 0, 1) ['0, 0, 1']
(0, 0, 2) ['0, 0, 2']
(0, 0, 5) ['0, 0, 5']