First-Class Function References

def shout(text):
    print("built shout handler")
    return text.upper() + "!"

def whisper(text):
    print("built whisper handler")
    return text.lower() + "..."

handlers = {"loud": shout, "quiet": whisper}
print("handlers ready")
result = handlers["loud"]("go")
print(result)

What does this print, in order?

A

Raises TypeError: 'dict' object is not callable, because handlers["loud"]("go") is read as calling handlers itself.

B
handlers ready
built shout handler
GO!
C
built shout handler
built whisper handler
handlers ready
GO!
D
handlers ready
built shout handler
built shout handler
GO!