I am working on a method to return all the class variables as keys and values as values of a dictionary , for instance i have:
first.py
class A: a =
You need to filter out functions and built-in class attributes.
>>> class A: ... a = 3 ... b = 5 ... c = 6 ... >>> {key:value for key, value in A.__dict__.items() if not key.startswith('__') and not callable(key)} {'a': 3, 'c': 6, 'b': 5}