title: Why can't <some-name> be used in a python list?
body: <p>For example, we can't manually enter in the list:</p>
  
  <pre><code>list = [&lt;element1&gt;, &lt;element2&gt;, &lt;element3&gt;...]
  </code></pre>
  
  <p>which throws an error:</p>
  
  <pre><code>&gt;&gt;&gt; list = [&lt;DOM Text node "u'\n\t'"&gt;]
    File "&lt;stdin&gt;", line 1
      list = [&lt;DOM Text node "u'\n\t'"&gt;]
          ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>whereas we can put the element from the XML parse elements into a list, which doesn't cause any syntax error. I have listed some XML elements in a list:</p>
  
  <pre><code>[&lt;DOM Text node "u'\n\t'"&gt;, 
   &lt;DOM Element: APPLE at 0x18a4648&gt;, 
   &lt;DOM Text node "u'\n\t\n\t'"&gt;, 
   &lt;DOM Element: GOOGLE at 0x18a4968&gt;, 
   &lt;DOM Text node "u'\n\t\n\t'"&gt;, 
   &lt;DOM Element: LENOVO at 0x18a4b48&gt;, 
   &lt;DOM Text node "u'\n\t\n\t'"&gt;, 
   &lt;DOM Element: SAMSUNG at 0x18a4be8&gt;, 
   &lt;DOM Text node "u '\n'"&gt;]
  </code></pre>
  
  <p>which works fine, but when I manually try to feed the list with above elements, it fails.</p>
  
  <p>Can anyone explain why this is so?</p>