Why should a python variable of type list should be defined first before assigning a value? : <p><code>x = 2</code></p>

<p>creates an integer variable. </p>

<p><code>y.append(3)</code></p>

<p>gives an error message (name 'y' is not defined). </p>

<p>In the first one a variable <code>x</code> can be assigned a value without first defining it, why can't we do the same thing with the lists (you have to first define it using <code>l = []</code>). Is this the result of a fundamental design choice in the Python language?
Thanks.</p>
