Skip to content

Commit e73ac56

Browse files
committed
solution
1 parent fc7a908 commit e73ac56

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/main.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ def __init__(
1414
Animal.alive.append(self)
1515

1616
def __repr__(self) -> str:
17-
return f'{{{", ".join(
18-
f"{k.capitalize()}: {v}" for k, v in self.__dict__.items()
19-
)}}}'
17+
sub_str = (f"{k.capitalize()}: {v}" for k, v in self.__dict__.items())
18+
return f'{{{", ".join(sub_str)}}}'
2019

2120

2221
class Herbivore(Animal):

0 commit comments

Comments
 (0)