how loop through an object in python3 code example Example: loop through python object for attr, value in k.__dict__.items(): print(attr, value)