Смотрите мой комментарий к вашему вопросу. Это просто чтобы дать вам представление:
class Organisation:
def __init__(self, orgname):
self.orgname = orgname
self.employees = {} # a dictionary
def add_employee(self, employee):
id = employee.id
if id in self.employees:
raise Exception(f'Employee {id} already exists.')
self.employees[id] = employee
def lookup_employee(self, id):
return self.employees.get(id)
# other methods
class Employee:
def __init__(self, id, name, age, gender, organisation):
self.id = id # must be a unique number or string
self.name = name
self.age = age # wouldn't date of birth be better because a person's age changes as time goes on?
self.gender = gender
organisation.add_employee(self) # add ourselves to the company
# and other methods
company = Organisation('ItttyBiity Machine Company')
booboo = Employee(1, 'Booboo', 106, 'N', company)