title: Python strips quotation marks when using os.getenv
body: <p>I'm having difficulty with different string arrays. Previously, there were string arrays only in properties files. Currently, the system has string arrays in properties files and set as environmental variables in the user's .bashrc file. The string arrays look like the following in both the properties and .bashrc files.</p>
  
  <pre><code>STRING_ARRAY="host1","host2","host3"
  </code></pre>
  
  <p>Previously, there was a simple pair of for loops that read a series of these string arrays and passed them into some function.</p>
  
  <pre><code>for k in ("STRING_ARRAY","SOME_OTHER_ARRAY"):
     globals()[k] = globals()[k].replace("\"",'').split(",")
  
  for stringarray,otherarray in zip(STRING_ARRAY, SOME_OTHER_ARRAY):
     someFunction(stringarray,otherarray)
  </code></pre>
  
  <p>This worked fine. The problem arose when some of the variables were moved out of properties files that were passed into the python script and into environmental variables. It seems that when using either os.getenv("HOSTSTRINGARRAY") or os.environ["HOSTSTRINGARRAY"], the os library returns the array of strings without the accompanying quotation marks so</p>
  
  <pre><code>PROPERTIES_STRING_ARRAY="host1","host2","host3"
  print PROPERTIES_STRING_ARRAY
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>"host1","host2","host3"
  </code></pre>
  
  <p>whereas</p>
  
  <pre><code>ENV_VAR_STRING_ARRAY="host1","host2","host3"
  print os.getenv("ENV_VAR_STRING_ARRAY")
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>host1,host2,host3
  </code></pre>
  
  <p>This is a problem because I can't seem to mix and match the two types of variables as follows</p>
  
  <pre><code>for k in ("POPERTIES_STRING_ARRAY",os.getenv("ENV_VAR_OTHER_ARRAY")):
     globals()[k] = globals()[k].replace("\"",'').split(",")
  
  for stringarray,otherarray in zip(STRING_ARRAY, os.getenv("ENV_VAR_OTHER_ARRAY")):
     someFunction(stringarray,otherarray)
  </code></pre>
  
  <p>So my question is, how do get os.getenv or os.environ to return a comma separated list of strings without stripping off the quotations marks enclosing the individual strings?</p>