Guest User

Untitled

a guest
Dec 16th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. def if_function(condition, true_result, false_result):
  2. if condition:
  3. return true_result
  4. else:
  5. return false_result
  6.  
  7. def with_if_statement():
  8. if c():
  9. return t()
  10. else:
  11. return f()
  12.  
  13. def with_if_function():
  14. return if_function(c(), t(), f())
  15.  
  16. def c():
  17. 0
  18. def t():
  19. print("5")
  20. def f():
  21. print("1")
Add Comment
Please, Sign In to add comment