def caller(f): f() def hello(): print("hi") def goodbye(): print("bye") caller(hello) # Prints "hi" caller(goodbye) # Prints "bye"