Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
rinotokun committed Nov 14, 2023
1 parent f8e43e2 commit 93ae2ec
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ def create_person_list(people: list) -> list:
)
)
for index in range(len(list_of_people)):
for _ in range(index + 1):
if "wife" in people[index]:
if not people[index]["wife"] is None:
list_of_people[index].wife = Person.people[
people[index]["wife"]
]
if "husband" in people[index]:
if not people[index]["husband"] is None:
list_of_people[index].husband = Person.people[
people[index]["husband"]
]
if "wife" in people[index]:
if people[index]["wife"]:
list_of_people[index].wife = Person.people[
people[index]["wife"]
]
if "husband" in people[index]:
if people[index]["husband"]:
list_of_people[index].husband = Person.people[
people[index]["husband"]
]
return list_of_people

0 comments on commit 93ae2ec

Please sign in to comment.