Is it possible to pass arguments to a function within a dictionary?
d = {"A": foo(), "B": bar()}
def foo(arg):
return arg + 1
def bar(arg):
return arg - 1
In this case I want to pass arg to bar() by referencing the function dynamically
d["B"] #<-- pass arg to bar()
fooI'm looking at in the question doesn't do that.