Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
lambda function [sorted(gen), sorted(gen)] solution in Clear category for The Ship Teams by Phil15
two_teams = lambda sailors: [sorted(sailor for sailor, age in sailors.items()
if age > 40 or age < 20),
sorted(sailor for sailor, age in sailors.items()
if 20 <= age <= 40)]
Sept. 2, 2018