标签: python-3.x function dictionary arguments call
def test(dictionary): print(dictionary) t = 'test' d = {'a': 341, 'b': 'vhjalj'}
如何使用t和d来调用test(d)?例如,我想通过t(d)调用test(d)。
我已经尝试过eval(t +'('+ d +')'),但是python解释说一个'只能将str(而不是“ dict”)连接到str'。