Question: IN PYTHON Use Python's list comprehension to make a list of all the words in a string that have more than three letters and either

 IN PYTHON Use Python's list comprehension to make a list of

IN PYTHON

Use Python's list comprehension to make a list of all the words in a string that have more than three letters and either begin with a vowel or contain any of the letters from a second string provided. Name the function "word_smith". This function will receive two strings as input and must return the count of words in the list as an integer value. The first string will be used to build your list. The second string will be the one to check for characters. Example Input strings: "Programming languages is definitely the best course I have taken in my entire undergraduate CS career!", "Don't OVERTHINK it!" List: [Programming, languages, definitely, best, course, taken, entire, undergraduate] Return: 8 Notes on vowel: Normal vowels including y. The case does not matter, Aa Notes on the input strings: Case matters. E =-e Spaces are not words so you can ignore them as characters. . . You should ignore any character that is not part of the English alphabet ([a-z,A-Z) in the second string. Which means, from the example, that if the first input string contains the word "whomst?!", it would be included in the count because of the 'o' and 't', however, "play!" would not be included. Non-alphabet characters do not count towards the character count. Ee! is two characters

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!