Question: Please do this in Python. Thank you! employees_list_tuples.py # (id, lastname, firstname, title, salary) employees = [ ('111','Last111','First111','Database Administrator',75111), ('222','Last222','First222','Software Engineer',51722), ('321','Last321','First321','Database Administrator',68321), ('333','Last333','First333','Sr Software
Please do this in Python. Thank you!


employees_list_tuples.py
# (id, lastname, firstname, title, salary) employees = [ ('111','Last111','First111','Database Administrator',75111), ('222','Last222','First222','Software Engineer',51722), ('321','Last321','First321','Database Administrator',68321), ('333','Last333','First333','Sr Software Engineer',60333), ('345','Last345','First345','Sr Software Engineer',59345), ('369','Last369','First369','Software Engineer',36369), ('444','Last444','First444','Software Engineer',44444), ('456','Last456','First456','Software Engineer',45456), ('555','Last555','First555','Sr Software Engineer',55555), ('654','Last654','First654','Coach',60654), ('666','Last666','First666','Coach',66666), ('678','Last678','First678','Coach',67678), ('693','Last693','First693','Coach',69693), ('777','Last777','First777','Database Administrator',77777), ('789','Last789','First789','Database Administrator',78789), ('888','Last888','First888','Database Administrator',88888), ('963','Last963','First963','Manager',98963), ('987','Last987','First987','Manager',99987), ('999','Last999','First999','Manager',100999) ]
Group employees by title in dictionary Attached Files: employees_list tuples.py (1.093 KB) Using the list of employee tuples, create a dictionary with the title as key and the value is a list of the employee tuples with that title Since dictionaries are unsorted, you will need to write code to display the dictionary in sorted order on title as follows: Display the title on its own line along with the number of employees with that title Then display the employees with that title in descending order by salary, one per line in the following format: lastname, firstname - Ssalary
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
