Question
Write a function that will take a single list argument with a minimum of 7 words. The purpose of the function is to find any
Write a function that will take a single list argument with a minimum of 7 words. The purpose of the function is to find any words with three letters and move them to the front of the list. Return the new list to the caller. For example if the list was: AAAA,BBB,CC,DDD,EEEE,FFFF,GGG the new list would be: BBB,DDD,GGG,AAAA,CC,EEEE,FFFF
Now write a script that asks the user for a sentence with minimum of 7 words, using negative logic, keep asking until they provide a sentence with 7 words. Once provided, pass the sentence as a list to the function to test its operation, print the return value to ensure it is working properly. IN PYTHON
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