Q:

Convert Dictionary to a List

I am struggling to understand how a dictionary with 2 keys as below works. I am familiar with traditional key:value dictionary but not with the one below. I need to covert a dictionary into a regular dictionary so it looks like d1 = {1:0.26, 2:0.84, 3:0.71, 4:0.03}
Thanks everyone for help
d1 = {'inds': [1, 2, 3, 4,], 'vals': [0.28, 0.84, 0.71, 0.03]}

A:

If you are on python 3 and not legacy python you could simply do this:
{i+1: v for i, v in enumerate(d1['vals'])}

