title: Indexing character to integer in tuple and using this for dictionary
body: <p>I have a list of tuples, such as:</p>
  
  <pre><code>corp = [('h','somename'), 
          ('h','someothername'),
          ('a','awholeothername'),
          ('a','name again'),
         ]
  
  </code></pre>
  
  <p>I wish to create a dictionary where the first index, h or a, is mapped to an integer, in the way of </p>
  
  <pre><code>for x,y in corp:
      if x == 'h':
         x = 1
      x = 0 
  </code></pre>
  
  <p>But this does not seem to work, as we can not do item assigning in Python. After having mapped all of the 0'th indexes to integers...</p>
  
  <p>what I tried: </p>
  
  <pre><code>dicts = {'nationality': {} , 'name': {}}
  for x,y in data:
      dicts['nationality'] == x
      dicts['name'] == y 
  </code></pre>
  
  <p>But doesn't work. I usually stay FAR away from dictionaries, even after two years of coding, which is now biting me in the ass.</p>