Dictionaries in Python
<p>What do these two statements mean in Python?</p>

<pre><code>distances[(clust[i].id,clust[j].id)]=distance(clust[i].vec,clust[j].vec)

d=distances[(clust[i].id,clust[j].id)]
</code></pre>

<p>I am guessing that the first statement assigns clust[i].id and clust[j].id keys of the distances map to the result of the distance(..) function. However, I am confused since lists are represented using [ ] and dictionaries using { } in Python. What's the correct answer?  </p>
