Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #input: [[18, 20],[45, 2],[61, 12],[37, 6],[21, 21],[78, 9]]
- def openOrSenior(data):
- return ["Senior" if age >= 55 and handicap > 7 else "Open" for age, handicap in data]
- Alternatywne rozwiązanie:
- def openOrSenior(data):
- 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