title: Python: List to tuple without "
body: <p>I am trying to use the Abaqus (a commercial FEA code) scripting interface to generate FE models, although my question is relating to Python specifically, but a bit of background on why I am trying to do this. </p>
  
  <p>Abaqus has a built in boolean merge operation that requires the following syntax to be used:</p>
  
  <pre><code>a.InstanceFromBooleanMerge(name='name_string', instances=(
      a.instances['string1'], a.instances['string2'], 
      a.instances['string3'], ), originalInstances=SUPPRESS, 
      domain=GEOMETRY)
  </code></pre>
  
  <p>The 'instances' parameter is specified as a tuple where each element is of the format</p>
  
  <pre><code>a.instances['string1']
  </code></pre>
  
  <p>I am trying to make it so that the number of elements within this tuple, and obviously the names within it are scriptable. Currently I have code which looks like:</p>
  
  <pre><code>my_list = []
  for i in range(4):
      name = str('a.instances[\'')+str('name_')+str(i)+str('\']')
      my_list.append(name)
  my_list = tuple(my_list)
  print my_list
  </code></pre>
  
  <p>However, this gives: </p>
  
  <pre><code>("a.instances['name_0']", "a.instances['name_1']", "a.instances['name_2']",   
      a.instances['name_3']")
  </code></pre>
  
  <p>I have tried using lstrip and rstrip to remove the " characters but to no avail. Is there a way of generating a tuple of arbitrary length where the elements are not enclosed in inverted commas? The format is specified by the Abaqus interface, so there is no alternative format that can be used. </p>
  
  <p>Many Thanks </p>