Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Ship Teams by StanislauL
#2 ways:
def two_teams(sailors):
return [
sorted(list(filter(lambda x: sailors[x]<20 or sailors[x]>40, sailors))),
sorted([x for x in sailors if 20<=sailors[x]<=40])
]
March 31, 2020