Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

basic python with no lambda Lab Description: Write a function that would do the following: - Alphabetize a list based on the second letter of

image text in transcribedbasic python with no lambda

Lab Description: Write a function that would do the following: - Alphabetize a list based on the second letter of each word. You can assume all characters are lower case. - If there are any words that have the same second letter as each other - remove any word afte the first word of those matches. - Add to the end of the list another copy of all the words in which the second letter is a vowel. - Add the length of all the words in the updated list and return the sum. Sample Data the_list = ['redundant', 'profuse', 'humdrum', 'common', 'obey', 'receive', 'young', 'business', 'join', 'bad', 'observe', 'smooth', 'mighty',' 'page', 'simplistic', 'rifle', 'true', 'class', 'thundering', 'nostalgic', 'play', 'seemly', 'fumbling', 'rabbits', 'abstracted', 'soap', 'teeny', 'probable',' 'enthusiastic', 'ubiquitous'] Sample Output "output depends on original sort" 111 ['bad', 'obey', 'redundant', 'thundering', 'mighty', 'class', 'smooth', 'enthusiastic', 'nostalgic', 'true', 'business', 'bad', 'redundant', 'mighty', 'nostalgic', 'business'] OR 106 ['bad', 'obey', 'redundant', 'thundering', 'mighty', 'class', 'smooth', 'enthusiastic', 'common', 'profuse', 'humdrum', 'bad', 'redundant', 'mighty', 'common', 'humdrum'] OR 107 ['rabbits', 'obey', 'receive', 'thundering', 'rifle', 'class', 'smooth', 'enthusiastic', 'soap', 'probable', 'fumbling', 'rabbits', 'receive', 'rifle', 'soap', 'fumbling']

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

Step: 3

blur-text-image

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

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

Students also viewed these Databases questions