title: TypeError: tuple indices must be integers or slices, not dict
body: <p>I'm creating a tax calculation program using a dictionary of tax rates. However, whenever I try to print out the dictionary keys or values, I keep getting multiple errors. I am looking to get just the 'keys' or 'values' but I keep getting these tuple errors.</p>
  
  <p>Errors:</p>
  
  <blockquote>
    <p>TypeError: tuple indices must be integers or slices, not dict"</p>
  </blockquote>
  
  <p>or </p>
  
  <blockquote>
    <p>"AttributeError: 'tuple' object has no attribute 'items'"</p>
  </blockquote>
  
  <p>or </p>
  
  <blockquote>
    <p>AttributeError: 'tuple' object has no attribute 'value'</p>
  </blockquote>
  
  <p>or</p>
  
  <blockquote>
    <p>AttributeError: 'tuple' object has no attribute 'keys'</p>
  </blockquote>
  
  <p>I can't even print the dictionary. I have provided all the scenarios below and they do not work for this very simple task. I'm not sure why I keep getting these errors.</p>
  
  <pre><code>tax_rates = {
    'AB' : .05,
    'BC' : .12,
    'MN' : .13,
    'NB' : .15,
    'NL' : .15,
    'NT' : .05,
    'NS' : .15,
    'ON' : .13,
    'PE' : .15,
    'QC' : .1475,
    'ST' : .11,
    'YK' : .05
  },
  
  for key in tax_rates:
    print(tax_rates[key])
  
  for key in tax_rates.items():
    print(key)
  
  for value in tax_rates.items():
    print(value)
  
  for key,value in tax_rates.items():
    print(key,value)
  
  tax = tax_rates.keys()
  print(tax)
  </code></pre>