Question: I need a solution to both of these: What does the following function do? def myFunction(words): result =[] for i in words: result.append(len(i)) print(result) Hint:

I need a solution to both of these:

I need a solution to both of these: What does the followingfunction do? def myFunction(words): result =[] for i in words: result.append(len(i)) print(result)

What does the following function do? def myFunction(words): result =[] for i in words: result.append(len(i)) print(result) Hint: words is a list of words A. Prints the length of the last word in the list B. Prints a list with the lengths of all the words in the list C. Prints the total length of all the words in the list D. Prints a list with each word followed by its length What will the following function do? def myFunction(one, two): for a in one: for b in two: if a==b: return True return False Hint: the function will take in 2 lists of numbers as input A. Returns True if there is at least one identical element in each list B. Returns True if there is exactly one identical element in each list C. Returns True if there is at least one identical element in both lists at the same index

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!