Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

10. Describe a chronological rsum and discuss its advantages.

Answered: 1 week ago