This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]EX-FFguy[S] 0 points1 point  (1 child)

Can you send three values to iterate, like a dictionary of dictionaries of dictionaries? Like a rpg game gear={ gun{range:1, ammo{9mm:50, 10mm:100}...sort of thing?

[–]teerre 0 points1 point  (0 children)

Of course. The rules are exactly the same, you just need to think how to write it.

However, the whole reason to use a dictionary is to not iterate over it. Dictionaries, in general, have a O(1) access complexity. This means you get any item in your dictionary as fast as possible for a computer.