title: Python : pass variable name as argument
body: <p>I have a function <code>f(x)</code> in which many local variables are created. <code>x</code> is a string with the same name as one of these local variables and I would like to change this local variable by changing <code>x</code>. What is the clean way to do this? Currently I am using a lot of <code>if/elif</code> statements.</p>
  
  <p>Some dummy code to represent my problem:</p>
  
  <pre><code>def f(x):
           a = [1,2,3]
           b = [2,3,4]
           c = [3,4,5]
           if x == "a":
                       a[0] = 10
           elif x == "b":
                       b[0] = 10
           elif x == "c":
                       c[0] = 10
           return a,b,c
  </code></pre>
  
  <p>I would like for the right variable to change value but using all these if/elif statements feels a bit redundant.</p>