title: Why python print the last key
body: <p>I am new in python and wondering about the result. I just want to understand it.
  suppose I have the following dictionary:</p>
  <pre><code>employee = {   
     'user_name': 'my name',   
     'password': 'hello',   
     'mobile phone': 123456789
  }
  
  for i in employee:    
      print(i)  
  
  print(i)
  </code></pre>
  <p>and here is the result:</p>
  <pre><code>user_name
  password
  ​mobile phone​
  mobile phone
  </code></pre>
  <p>if you notice that the (<strong>mobile phone</strong>) has been printed twice.the <em>second</em> one comes from the second print in the above code.</p>
  <ol>
  <li>Why this is happen?
  I expected to get this error:</li>
  </ol>
  <blockquote>
  <p>NameError: name 'i' is not defined</p>
  </blockquote>
  <p>as usual by python.</p>
  <ol start="2">
  <li>what if I want to access the first or second key? can I access with the same what I access the last one (without writing the key name or number)?</li>
  </ol>