answered 4 years ago
Just replace the last line of your code by
f = complicated_expression.function(*long_list_of_variables)