SyntaxFix
Write A Post
Hire A Developer
Questions
dir has been mentioned, but that'll only give you the attributes' names. If you want their values as well try __dict__.
class O: def __init__ (self): self.value = 3 o = O()
Here is the output:
>>> o.__dict__ {'value': 3}