How to dynamically access class properties in Python?

setattr(my_class_instance, 'attr_name', attr_value)

Leave a Comment