Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #input: [[18, 20],[45, 2],[61, 12],[37, 6],[21, 21],[78, 9]]
  2.  
  3. def openOrSenior(data):
  4. return ["Senior" if age >= 55 and handicap > 7 else "Open" for age, handicap in data]
  5.  
  6. Alternatywne rozwiązanie:
  7. def openOrSenior(data):
  8. return ["Senior" if person[0] >= 55 and person[1] > 7 else "Open" for person in data]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement