title: eval SyntaxError: invalid syntax in python
body: <p>I want to assign :</p>
  
  <pre><code>x0='123'    
  x1='123'    
  x2='123'    
  x3='123'    
  x4='123'    
  x5='123'    
  x6='123'    
  x7='123'    
  x8='123'    
  x9='123'    
  </code></pre>
  
  <p>I write the code to express that i can get the output of a string <code>123</code> when  input <code>x1</code> or <code>x8</code> .</p>
  
  <pre><code>for i in range(0,10):
      eval("x"+str(i)+"='123'")
  
  Traceback (most recent call last):
  File "&lt;stdin&gt;", line 2, in &lt;module&gt;
  File "&lt;string&gt;", line 1
    x0='123'
    ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>How i can do that way?</p>