In order to call a function using dictionary we use the following code:
def f1():
print ("One")
def f2():
print ("Two")
def f3():
print ("Three")
dict = {1: f1, 2: f2, 3: f3}
dict[1]()
How does the last line dict[1]()
actually works?