You should use classes to create objects (in a future program) if you expect any behavior. I mean, an object is not only what stores variables. It also involves some kind of activity (called behavior). And properties are not only a way to set some values ββ(as characteristics of an object), but also a way to influence this behavior (you can add additional parts of the code, except for just saving data - some checks or smth.else).
And if you only need a design for storing data - this is not only better, this is a more logical step for storing them as an array or a dictionary.
A dictionary is better in most cases because you can access stored values ββby keywords. And your code will be much clearer. But the array should be (I donβt know for sure, just guessing) faster access (itβs harder to find a string key among other strings than an index among a sequence of incremented numbers).
source share