Topic was automatically imported from the old Question2Answer platform.
Asked By
jujumumu
If I have like the player name, level, experience should I store it in a list or dictionary. Like [‘Bob’, 5, 87] or {‘player name’ : ‘Bob’, ‘level’ : 5, ‘experience’ : 87}. Which one is better?
Of course, it always depends on the situation, but in general (at least for the way it sounds like you’ll be using it), a Dictionary would be the best option here. This way you can put the values in properties that have names that make sense, and you don’t have to remember or care about the order that you add or retrieve values.
Thanks, I will try it. Using lists are not really working for me.