title: conditionals with dicts Python
body: <p>I was wondering what is the correct way to check a <code>key:value</code> pair of a dict. Lets say I have this dict</p>
  
  <pre><code>dict_ = {
              'key1':'val1',
              'key2':'val2'
          }
  </code></pre>
  
  <p>I can check a condition like this</p>
  
  <pre><code>if dict_['key1'] == 'val1'
  </code></pre>
  
  <p>but I feel like there is a more elegant way that takes advantage of the dict data structure.</p>