Skip to content

Commit

Permalink
'solution'
Browse files Browse the repository at this point in the history
  • Loading branch information
xborismenx committed Oct 25, 2023
1 parent b565bb4 commit ca851c7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ def __init__(self, name: str, age: int) -> None:

def create_person_list(people: list) -> list:

people_list = [Person(name=person["name"], age=person["age"]) for person in people]
people_list = [Person(name=person["name"],
age=person["age"]) for person in people]
for person in people:
current_person = Person.people[person["name"]]
if person.get("wife"):
Expand All @@ -19,10 +20,3 @@ def create_person_list(people: list) -> list:
current_person.husband = Person.people[person["husband"]]

return people_list

people = [
{"name": "Ross", "age": 30, "wife": "Rachel"},
{"name": "Joey", "age": 29, "wife": None},
{"name": "Rachel", "age": 28, "husband": "Ross"}
]

0 comments on commit ca851c7

Please sign in to comment.