Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
sorted list comprehensions solution in Clear category for The Ship Teams by DeCooper
def two_teams(sailors):
team_a = [name for name, age in sailors.items() if age < 20 or age > 40]
team_b = [name for name in sailors.keys() if name not in team_a]
return [sorted(team_a), sorted(team_b)]
Sept. 2, 2018