title: python tuple to dict
body: <p>For the tuple, <code>t = ((1, 'a'),(2, 'b'))</code>
  <code>dict(t)</code> returns <code>{1: 'a', 2: 'b'}</code></p>
  
  <p>Is there a good way to get <code>{'a': 1, 'b': 2}</code> (keys and vals swapped)?</p>
  
  <p>Ultimately, I want to be able to return <code>1</code> given <code>'a'</code> or <code>2</code> given <code>'b'</code>, perhaps converting to a dict is not the best way.</p>