daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Dec 16th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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")
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
 
Top