get() method on dict to get a subvalue
<p>I have a dict where I want to say "if there is a category, then get the category icon. If not, return <code>''</code>".</p>

<p>I'm doing it to add the icon to a string:</p>

<pre><code>'Icon: %s' % venue.get('category', '').get('icon', 'No Icon')
</code></pre>

<p>Obviously if there is no category, <code>get()</code> throws an error. Here are a couple other wrong ways to do this:</p>

<pre><code>venue.get('category[icon]', '')

venue.get('category', '')['icon']
</code></pre>

<p>Hopefully that illustrates what I'm trying to do. Is there a way to do this without an if/else statement?</p>
