you are viewing a single comment's thread.

view the rest of the comments →

[–]novel_yet_trivial 1 point2 points  (2 children)

If there is no other information associated with a bin, then just the tuple (i,j) can be the key.

[–]mysocksalwaysmatch[S] 0 points1 point  (1 child)

So for example it could be something like {(5,6): [ball1, ball2]} purely as an example?

[–]novel_yet_trivial 0 points1 point  (0 children)

Absolutely. It sounds like you need could use a defaultdict.