I have the following lists
fncs = ["MyLinkedList","addAtHead","get","addAtTail"]
args = [[],[8],[1],[81]]
And I want to return
[MyLinkedList(), addAtHead(8), get(1), addAtTail(81)]
I thought I could use fnc_vals = [f(x) for f, x in zip(fncs, args)] but that doesn't seem to work since my fncs list is a list of strings. How can I apply a list of functions to a list of arguments (in Python)?
fncsbe a list of strings?