Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def if_function(condition, true_result, false_result):
- if condition:
- return true_result
- else:
- return false_result
- def with_if_statement():
- if c():
- return t()
- else:
- return f()
- def with_if_function():
- return if_function(c(), t(), f())
- def c():
- 0
- def t():
- print("5")
- def f():
- print("1")
Add Comment
Please, Sign In to add comment