class Test:
    pass
for mark, name in enumerate(('attr1', 'attr2', 'attr3')):
    setattr(Test, name, mark)
print(Test.attr1)
print(Test.attr2)
print(Test.attr3)
Can you add attributes to an object dynamically?