Answers for "how to get the dictionary from a object inside it in python"

3

python convert object into ditct

class A():
  def __init__(self):
    self.a = 1
    self.b = 2
    
a = A()
aDict = vars(a)
Posted by: Guest on June-02-2020

Code answers related to "how to get the dictionary from a object inside it in python"

Python Answers by Framework

Browse Popular Code Answers by Language