diff --git a/group.py b/group.py index e2ec347..8ea59ab 100644 --- a/group.py +++ b/group.py @@ -2,4 +2,23 @@ # Your code to go here... -my_group = +import collections +class person: + + def __init__(self, name, age, job) -> None: + self.name = name + self.age = age + self.job = job + self.connection = collections.defaultdict(list) + + def add_connection(self, friend): + self.connection[self.name].append(friend) + +Jill = person('Jill', 27, 'writer') +Jill.add_connection("zalika") +Jill.add_connection('Dave') + +Zalika = person('Zalika', 28, 'artist') +Dave = person('Dave', 34, 'driver') + +print(Jill.connection)