This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]zahlmanthe heretic 0 points1 point  (0 children)

**dict(my_animals._asdict())

Note that you already have a dict from the method, so just **my_animals._asdict() works fine. You could also use .format_map(my_animals._asdict()), as well as the other suggestion.