Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
List partition solution in Clear category for The Ship Teams by nickie
def two_teams(sailors):
L = [[], []]
def p(age): return 20 <= age <= 40
for name, age in sailors.items(): L[p(age)].append(name)
return [sorted(l) for l in L]
June 21, 2021
Comments: