title: Print details of an employee by entering the name of employee in Python
body: <p>I am getting input of details of the employee from the user and then asking the user to enter the name of the employee, he wants to retrieve information of. I am saving all the entered data in a dictionary with employee name as its key and [employee_id, salary, address] as the values. Now whatever name I enter to retrieve the details, the output is always the details of the last entered employee.</p>
  <pre><code>    n = int(input('Enter the number of employee: '))
      employees = {}
      
      for i in range(n):
          name = input('Enter the name of the employee: ')
          emp_id = input(&quot;Enter employee Id: &quot;)
          sal = int(input(&quot;Enter the employee salary: &quot;))
          address = input('Enter the employee address: ')
          employees[name] = [emp_id, sal, address]
      
      while True:
          name = input('Enter employee name: ')
          info = employees.get(name, -1)
          if info == -1:
              print('Employee does not exist')
          else:
              print('Employee details are: \n Employee Id: ', emp_id, '\n Salary: ', sal, '\n Address: ', address)
          
          exit_choice = input('Do you want to exit [Yes|No]: ')
          if exit_choice == 'No' or exit_choice == 'no':
              break
  </code></pre>
  <p>I want to get the output as the details of the employee whose name is entered. Please can you help me get out of this situation?</p>