title: why dict['port_password']['server_port'] = 126 is correct in this case inPyhton?
body: <p>Here is the code.</p>
  
  <pre><code>config={'port_password':{'server_port':123}}
  config['port_password'] = {}
  config['port_password']['server_port'] = 126
  print(config)
  </code></pre>
  
  <p>config['port_password'] = {}，why does config['port_password']['server_port'] = 126 is correct?</p>
  
  <pre><code>#config={'port_password':{'server_port':123}}
  config['port_password'] = {}
  config['port_password']['server_port'] = 126
  print(config)
  </code></pre>
  
  <p>when i comment out the first line,it said:"name 'config' is not defined".why?</p>