Dictionary Iteration Python
<p>I am newbie in Python.</p>

<p>Dictionary has multiple values. </p>

<pre><code>dc = {1:['2', '3'], 2:['3'], 3:['3', '4']}
</code></pre>

<p>If you iterate over 'dc' you find there are three occurrences of '3'. First occurrence is in 1:['2','3'].
I would like to iterate over dict so that </p>

<pre><code>if first occurrence of '3' occurs:
  dosomething()

else occurrence of '3' afterwards:#i.e. 2nd time, 3rd time....
  dosomethingelse()
</code></pre>

<p>How can I do this in Python</p>

<p>Thank you.</p>
