title: How to use eval() function with a list of variables?
body: <p>I have a list of functions as strings:</p>
  
  <pre><code>["y + x + 3", "x**2 + y**2 - 17"]  # 2 functions in list
  </code></pre>
  
  <p>I have a list of <code>Sympy Symbol</code> objects (basically variables) whos <code>.name</code> attribute cooresponds to the variables names in the function strings:</p>
  
  <pre><code>[Symbol(x), Symbol(y)]
  # list element 0's .name attribute is "x" 
  </code></pre>
  
  <p>I found that Python have a neat function called <code>eval()</code> which can evaluate strings, for example:</p>
  
  <pre><code>x = 1
  eval("x + 3") # Result should be 4
  </code></pre>
  
  <p>Basically this is what I want to do with my functions strings. However, since this is a dynamic implementation I don't have variables defined on a line above <code>eval()</code> in my program, they are in a list instead. For example, in the example above x is defined as 1, so then the <code>eval()</code> function can use it. </p>
  
  <p>But I have my variables in a list, not defined as a variable in the scope of my function. <strong>How could I use the <code>eval()</code> function and utilize my list of variables?</strong></p>