title: get items from a dict with tuple keys in python
body: <p>I have a dict with tuple keys as below</p>
  
  <pre><code>{('age', 'Low', 'Pos')  :    3 ,
  ('age', 'High', 'Pos')  :    11 ,
  ('age', 'Low', 'Neg')  :     8 ,
  ('age', 'High', 'Neg')  :    8 ,
  ('sex', 'male', 'Pos')  :    13 ,
  ('sex', 'female', 'Pos')  :  1 ,
  ('sex', 'male', 'Neg')  :    10 ,
  ('sex', 'female', 'Neg')  :  6}
  </code></pre>
  
  <p>Now I want to get keys which are the same in index 0,1</p>
  
  <p>e.g:</p>
  
  <pre><code>('sex', 'female', 'Pos') , ('sex', 'female', 'Neg')
  or
  ('age', 'Low', 'Pos') ,  ('age', 'Low', 'Neg')
  </code></pre>
  
  <p>How can I do this in python?</p>
  
  <p>This is what I currently have:</p>
  
  <pre><code>x = [i for i in d.keys() if i[0]=='age' and i[1]=='Low']
  </code></pre>