Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

difference between calling a function and referencing a function python

def caller(f):
    f()

def hello():
    print("hi")

def goodbye():
    print("bye")

caller(hello)  # Prints "hi"
caller(goodbye)  # Prints "bye"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #difference #calling #function #referencing #function #python
ADD COMMENT
Topic
Name
2+4 =