We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83804ee commit f4cb507Copy full SHA for f4cb507
1 file changed
prep_exercise/6_generics.py
@@ -13,8 +13,8 @@ class Person:
13
imran = Person(name="Imran", age = 33, children=[fatma, aisha])
14
15
def print_family_tree(person: Person) -> None:
16
- print(person.name)
+ print(f"- {person.name} ({person.age})")
17
for child in person.children:
18
- print(f"- {child.name} ({child.age})")
+ print_family_tree(child)
19
20
print_family_tree(imran)
0 commit comments