Skip to content

Instantly share code, notes, and snippets.

@sergzach
Last active February 13, 2023 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergzach/f613e0035cfe4c753546b210a4a950d0 to your computer and use it in GitHub Desktop.
Save sergzach/f613e0035cfe4c753546b210a4a950d0 to your computer and use it in GitHub Desktop.
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