iterate through objects variables 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("__")]