Question
Question You are given a list of staff members- each with a first and last name separated by a space, and need to sort them
Question You are given a list of staff members- each with a first and last name separated by a space, and need to sort them alphabetically by last name for a directory. However, the person who provided you the list did not proofread the records and accidentally misspelled some of the names. You can identify which ones have typos just by looking at the first letter of the first name.
- First, sort the list alphabetically by the last name. - Remove any members whose first name starts with "Q" or "X". - Return the resulting list.
Args: staff (list) Returns: list
>>> name_sort(['Damon Williams', 'Xngel Cabrera', 'George Burdell', 'Brett Key', 'David Joyner', 'Qon Lowe']) ['George Burdell', 'David Joyner', 'Brett Key', 'Damon Williams']
Please provide python code and resulting output.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started