SHARE
TWEET

Untitled

a guest Apr 24th, 2019 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top