Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Self-documenting solution in Clear category for The Ship Teams by suic
def two_teams(sailors):
between_20_and_40 = []
others = []
for sailor, age in sailors.items():
if 20 <= age <= 40:
between_20_and_40.append(sailor)
else:
others.append(sailor)
return [sorted(others), sorted(between_20_and_40)]
Sept. 1, 2018