Python - intersection between a list and keys of a dictionary
<p>I have a list that looks like this:</p>

<pre><code>l1 = ['200:200', '90:728']
</code></pre>

<p>I have a dictionary that looks like this:</p>

<pre><code>d1 = {'200:200':{'foo':'bar'},'300:300':{'foo':'bar'}}
</code></pre>

<p>I need to get filter out the dictioary where only the keys are in l1.  The dict should look like this:</p>

<pre><code>result = {'200:200':{'foo':'bar'}}
</code></pre>

<p>In essence a intersection of a list and the keys of a dict while returning the subsection of the dict.</p>

<p>How do I do this efficiently where time is an issue for a large sets?</p>

<p>Thanks </p>
