As you can see in the python wiki TimeComplexity , list and dict , they both have the same complexity in the average case of getting an O (1) element. So there shouldn't be that much difference for simple index based indexes.
EDIT: I just wrote a little benchmarking that gets the first element, one from the center and the last. You can see that the list has little progress (although the deviation of 0.01 s is not so great considering that the code works 1,000,000 times).
In conclusion, I would use a list if I were in your situation, as it is also better suited to the index-based query problem.
>>> from timeit import Timer >>> t=Timer("(l[0], l[3], l[7])","l=[50, 30, 30, 30, 20, 30, 50, 40]") >>> sorted(t.repeat(5)) [0.17861513267149576, 0.17863279532627985, 0.17883092423682, 0.17892576501373014, 0.18901037296996037] >>> t=Timer("(l[0], l[3], l[7])","l={0: 50, 1: 30, 2: 30, 3: 30, 4: 20, 5: 30, 6: 50, 7: 40}") >>> sorted(t.repeat(5)) [0.18541179903735383, 0.1855488765975224, 0.1855757545505412, 0.18578041096390052, 0.21753940019925722]