 <p>Yes, this is possible. The syntax is a bit different, however.</p> <pre><code>if key in myDict: if innerKey in myDict[key]: myDict[key][innerKey] += 1 else: myDict[key][innerKey] = 0 </code></pre>