def covers(device_min, device_max, users):
too_low = [u for u in users if u < device_min]
too_high = [u for u in users if u > device_max]
return too_low, too_high
elbow_heights = [63, 66, 68, 70, 71, 72, 74, 76]
for name, lo, hi in [("Desk A", 68, 74), ("Desk B", 60, 78)]:
low, high = covers(lo, hi, elbow_heights)
ok = "fits everyone" if not low and not high else f"misses {low + high}"
print(f"{name} ({lo}-{hi} cm): {ok}")
List comprehensions find the users outside each desk's adjustment range (example values).