Python obtenga atributos de objeto
getattr(object, 'attribute_name')
b0lle
getattr(object, 'attribute_name')
class Person:
def __init__(self,name,age):
self.name = name
self.age = age
def printInfo(self):
print("name: {}, age: {}".format(self.name,self.age))
p1 = Person('Tom',24)
# right below
print(p1.__dict__)