![](/static/253f0d9b/assets/icons/icon-96x96.png)
![](https://programming.dev/pictrs/image/170721ad-9010-470f-a4a4-ead95f51f13b.png)
2·
9 months agoOnly if you have to rescue many princesses in a short period of time
Only if you have to rescue many princesses in a short period of time
Rescuing is only I/O bounded; your argument is irrelevant.
Don’t forget to keep your return values…
rescued_princesses = [{"princess": princess, "rescued": princess.rescue()} for princess in [castle.get_princess() for castle in castles]]
Python:
from Rescues import Princess
Princess.rescue()
And try as I might, it still looks horrible 😔