title: How to implement switch case in python using Dict
body: <p>I am tring to implement the switch case using dict but the function unable to call.so like the below code if the select 1 how addEmployee() method will be call.</p>
  <pre><code>  employee_dictionary = {}       
    while proceed:
  
         print('\n Employee Management System\n')
         print('\t1. Add a new employee')
         print('\t2. Delete an existing employee')
         print('\t3. Save and Quit\n')
         option_choice = int(input('Enter an option to continue: '))
  
         # Map each choice to the functions below using a dictionary
         options = {
             1:emp.addEmployeeInDict(),
             2:emp.deleteEmpUsingID(emp),
             3:&quot;Exit&quot;
         }
         proceed = options[option_choice](employee_dictionary)
  </code></pre>
  <p>Add Employee Code :</p>
  <pre><code>def addEmployeeInDict(self):
  employeeDetails = {}
        old_detailsOfEmp=[]
        new_detailsOfEmp = []
     try:
             for i in range(1):
                 emp_ID = int(input(&quot;Enter emp ID: &quot;))
                 old_detailsOfEmp.clear()
                 for j in range(3):
                     if j==0:
                       emp_Name = input(f&quot;Enter Emp Name :&quot;)
                       old_detailsOfEmp.append(emp_Name)
                     elif j==1:
                       emp_dept = input(f&quot;Enter Emp Dept :&quot;)
                       old_detailsOfEmp.append(emp_dept)
                     else:
                       emp_Sal = int(input(f&quot;Enter Emp Sal :&quot;))
                       old_detailsOfEmp.append(emp_Sal)
                 new_detailsOfEmp=copy.deepcopy(old_detailsOfEmp)
                 employeeDetails[emp_ID] = new_detailsOfEmp
                 proceed = True
             return proceed
  </code></pre>