I have a dictionary (index2) of 3-item lists, organized by key from 0-150 or so. I need to sort it into another dictionary, with the following constraints:
1.) all items attached to one key must stay together in the second dictionary
2.) length of items in the second dictionary must all be the same. To help with this one, I divided the total number of items in the first dictionary by the number of keys in the second and attached it to a variable so it can be used as a limiting factor.
This is what I have so far, however when I run it, it doesn't actually append anything to the target dictionary.
for key,runs in index2.iteritems():
for a in mCESrange:
if index2[key][0] in mCESdict[a]:
pass
elif len(mCESdict[a]) < mCESlength:
pass
else:
mCESdict[a].extend(index2[key])