Guest User

Untitled

a guest
Jan 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. f=lambda x: True if x % 2 == 0 else pass
  2.  
  3. f=lambda x: True if x % 2 == 0
  4.  
  5. f = lambda x: x % 2 == 0
  6.  
  7. >>> f=lambda x: x % 2 == 0
  8. >>> f(2)
  9. True
  10. >>> f(3)
  11. False
  12. >>>
  13.  
  14. >>> f=lambda x: x % 2 == 0 or None
  15. >>> f(2)
  16. True
  17. >>> f(3)
  18. >>>
Add Comment
Please, Sign In to add comment