iterate over attributes of an object python code example
Example: iterate through attributes of class python
L = [[getattr(self, attr), attr] for attr in dir(self) if not attr.startswith("__")]
L = [[getattr(self, attr), attr] for attr in dir(self) if not attr.startswith("__")]