0

Say I have a class that has 100 variables in it that each have values. How would I go about getting each of those values without having to know the name of the variable. For example:

class Stuff():
    a = 1
    b = 2
    c = 3
    d = 9.36
    e = "f"
    #and so on...

for i in dir(Stuff):
    print(Stuff.i)    #Does not work but it's what I want to achieve

0 Answers0