Question: PYTHON 3.6 Problem 12 Part A (12 points) Write a function named containsLetter) that identifies all of the strings in a list that contain a

PYTHON 3.6

PYTHON 3.6 Problem 12 Part A (12 points) Write a function named

Problem 12 Part A (12 points) Write a function named containsLetter) that identifies all of the strings in a list that contain a specified letter and returns a list of those strings The function containsLetter() takes two parameters: 1. a string of length 1, aLetter 2. a list of strings, strList For example, the following would be correct output: >>> hulkLine = ["you", "wouldn't", "like", "me", "when", "i"m", "angry"] >>> searchLetter li! >>>print (containsLetter(searchLetter, hulkLine)) Problem 12 Part B (8 points) Write code that calls containsLetter) for each letter in 'hulk'. Each function call should pass one of the letters in 'hulk' and the string hulkLine as parameters. After each function call your code should print the list of words returned by containsLetter(). For full credit, you must put the call to containsLetter() inside of a for loop The following would be correct output. ["you", "would ["wouldn't" "like" 1 ["like"1 n't"]

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!