title: Removing apostrophe from elements of list in Python language
body: <p>I am creating a list by iteration in python and my list looks like this </p>
  
  <pre><code>l = ['x','y','z']
  </code></pre>
  
  <p>I want to make my list look like this without apostrophe on its elements</p>
  
  <pre><code>l = [x,y,z]
  </code></pre>
  
  <p>Problem with the first notation is that my viewkeys() is taking j as a string name ,not as a dictionary name.Second notation works fine.Here x,y,z are dictionary names.</p>
  
  <pre><code>keys=reduce(lambda i,j: i | j ,[j.viewkeys() for j in l])
  </code></pre>
  
  <p>I tried strip('\'') but failed.Any suggestions?</p>
  
  <p>If I have:</p>
  
  <pre><code>x = {'a':1, 'b': 2, 'c':5}
  y = {'b':10, 'c': 11}
  z = {'e':5, 'b': 2}
  l=[x,y,z]
  keys=reduce(lambda i, j: i | j, [j.viewkeys() for j in l])
  </code></pre>
  
  <p>This code will run fine.But when i am trying to create l list iteratively it is taking as</p>
  
  <pre><code>l = ['x','y','z']
  </code></pre>
  
  <p>and the <code>viewkeys()</code> is giving error:</p>
  
  <blockquote>
    <p>AttributeError: 'str' object has no attribute 'viewkeys'</p>
  </blockquote>