keys = json.keys()
order = list(keys)
q1 = int(round(len(keys)*0.2))
q2 = int(round(len(keys)*0.3))
q3 = int(round(len(keys)*0.5))
b = [q1,q2,q3]
n=0
for i in b:
    queues = order[n:n+i]
        
    n = n+i
    lists = [(queues[j], json.get(queues[j])) for j in range(len(queues))] 
    
    dicts = dict(lists)
    print dicts
    print dict[0]

print dicts works as expected. It gives me the entire dictionary. But when I do 
dicts[0], there is the following error:
'type' object has no attribute '__getitem__'
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to