How do I enumerate over all attributes and instances of a class in Python?
This is the class:
class Human:
def __init__(self, name, age, gender):
self.name = name
self.age = age
self.gender = gender
This can't be a duplicate. I basically want to get a dictionary of all attributes name and their values and loop over the dictionary.