Here is an example code of what I am trying to do. My end goal is creating a JSON object for class real estate agent, but I am struggling because I don't know what to do about self.housesSold
.
class realEstateAgent:
def __init__(self, name, salary, houses):
self.name = name
self.sal = salary
self.housesSold = #a list of **HOUSE** objects
class houseSold:
def __init__(openPrice, closePrice, closeDate):
self.openPrice = openPrice
self.closePrice = closePrice
self.closeDate = closeDate