What is the difference between how dictionary and list datastructures appear in memory?
<p>For instance, if I was to create the following code:</p>

<pre><code>a_list = ['this', 'is', 'a', 'sentence']
a_dict = { 0: 'this', 1 : 'is', 2 : 'a', 3 : 'sentence'}
</code></pre>

<p>then typing in the command prompt</p>

<pre><code>&gt;a_list[0]
</code></pre>

<p>yields</p>

<pre><code>&gt;'this'
</code></pre>

<p>as does</p>

<pre><code>&gt;a_dict[0]
</code></pre>

<p>yield</p>

<pre><code>&gt;'this'
</code></pre>

<p>Is there anything wrong with saying that a list is a type of dictionary if used strictly in the above manner so that the keys are the integers beginning at 0? Functionally they seem the same to me <em>at this level of abstraction</em>, so what is the difference in space that the - I assume functionally - equivalent structures take up in memory, and the speed in which we can access the values in python? A dictionary is a mathematical map, and a map that maps the positive integers to values is mathematically equivalent to a list. Am I wrong in saying given the above restrictions they are functionally the same <em>at this level of abstraction</em>. So what is the practical or computational difference in python? </p>
