Question: Cannot change defcountings(data): only enter new code below that to get an output of 42. PROBLEM 1 Create a function that counts the number of

Cannot change "defcountings(data):" only enter new code below that to get an output of 42.
PROBLEM 1 Create a function that counts the number of times the letter 's' occurs in the list of strings given as input data. In [148]: inputData = ["Count the number of times the letter 's' occurs in this list of strings.",\ "This exercise gives you experience processing a list of strings.",\ "In practice, you could think of a list of strings as a list of documents." "You would process the documents like you process this list of strings."\ "String processing is common in text mining." "And text mining is common in business analytics." "So, this is good practice."] In [38]: def countings(data): #ENTER YOUR CODE BELOW YOUR OUTPUT: In [ ]: countings(inputData) CORRECT OUTPUT: In [7]: countings(inputData) 42
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
