I have a dict that stores two functions like this:
def quick():
print("dex is 1")
def strong():
print("str is 1")
def start():
suffix = {"quick" : quick(), "strong" : strong()}
suffix.get("quick")
start()
And then I execute this code, the output is:
dex is 1
str is 1
It seems that my dict.get()
didn't work well here. Why are both of the functions executed, and not just the quick
function?