Advertisement
nekotrap

Untitled

Nov 18th, 2021
1,019
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.89 KB | None | 0 0
  1. def get_people_with_min_age(people): return sorted(list(x["name"] for x in filter(lambda x: x["age"] == min(x["age"] for x in people), people)))
  2. def get_people_with_max_age(people): return sorted(list(x["name"] for x in filter(lambda x: x["age"] == max(x["age"] for x in people), people)))
  3. def get_people_with_min_height(people): return sorted(list(x["name"] for x in filter(lambda x: x["height"] == min(x["height"] for x in people), people)))
  4. def get_people_with_max_height(people): return sorted(list(x["name"] for x in filter(lambda x: x["height"] == max(x["height"] for x in people), people)))
  5. def get_people_with_min_weight(people): return sorted(list(x["name"] for x in filter(lambda x: x["weight"] == min(x["weight"] for x in people), people)))
  6. def get_people_with_max_weight(people): return sorted(list(x["name"] for x in filter(lambda x: x["weight"] == max(x["weight"] for x in people), people)))
  7.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement