Removing items of a certain index from a dictionary?
<p>If I've got a dictionary and it's sorted, and I want to remove the first three items (in order of value) from it by index (no matter what the contents of the initial dictionary was), what do I do? How would I go about doing so?
I was hoping it would let me just slice (such as one does with lists), but I've been made aware that that's impossible. </p>

<p>EDIT: By index I mean indices. So for example, were I to remove the items from 1 to 3 of the sorted dictionary below, after it was sorted by value, then I would only be left with "eggs".
EDIT 2: How do I find the keys in those places then (in indices 0, 1, 2)?
EDIT 3: I'm not allowed to import or print in this.</p>

<p>For example:</p>

<pre><code>&gt;&gt;&gt;food = {"ham":12, "cookie":5, "eggs":16, "steak":2}
&gt;&gt;&gt;remove_3(food)
{"eggs":16}
</code></pre>