I have a function called filter that accepts a number of parameters in the format name=value. I have 2 lists: names and values (let's call them x and y), I need to be able to pass these into the function.
When I just pass in the string as in the below example, it gives me an error:
x = ['t', 't2']
y = [w, w2]
filter(x[0]=y[0], x[1]=y[1])
SyntaxError: keyword can't be an expression
I would also need to be able to pass in an arbitrary amount, for the size of the lists. How can I go about making this work?