Last active
February 13, 2023 05:44
-
-
Save sergzach/f613e0035cfe4c753546b210a4a950d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def foo1(condition, call_function): | |
if condition: | |
call_function() | |
def foo2(condition, call_function): | |
condition and call_function() | |
# else - not(condition) and call_function2() | |
def print_hello(): | |
print('hello') | |
foo1(3 > 2, print_hello) | |
foo2(3 > 2, print_hello) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment