I've a formula expression stored in a string and I want to extract variables only out of that string expression. This expression is basically a python code which calls some function in it.
For example,
expr = "sum(x)"
I want to extract only variable x from this string. It should discard sum from the string.
I tried py_expression_eval and AST which gives both sum and x as variables whereas I want only x from the parser.