Comment on Need a rust version too.
scratchresistor@thelemmy.club 11 months ago
Python:
from Rescues import Princess Princess.rescue()
map(lambda princess: princess.rescue(), [castle.get_princess() for castle in castles])
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]]
from Castle import Princess
Done
bob_lemon@feddit.de 11 months ago
map(lambda princess: princess.rescue(), [castle.get_princess() for castle in castles])
scratchresistor@thelemmy.club 11 months ago
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]]