title: Python KeyError: '0' on printing a dictionary value
body: <pre><code>File "F:\ake\pa\th\help.py", line 268, in main
  print type(outputs[x])
  KeyError: '0'
  </code></pre>
  
  <p>My file is quite large, so these are the places <code>outputs</code> is seen, in order of how they should be executed:</p>
  
  <pre><code>outputs={}
  
  #now in another function
  global another_var,outputs
  
  #if malarkey...
  elif lines[row][col]=="0":
      outputs["0"]=str(state) #state is either 0 or 1
  
  #back in original function
  global outputs
  
  for x in nums:
      print outputs[x], #line 268
  </code></pre>
  
  <p>I really am not sure why I am getting the error above.</p>