Question: Rewrite the findItemsInEither function by using sets to simplify it. There is no need to maintain the order of the items in the lists.

Rewrite the findItemsInEither function by using sets to simplify it. There is 

Rewrite the findItemsInEither function by using sets to simplify it. There is no need to maintain the order of the items in the lists. def findItemsInEither (list1, list2): list3 = [] for item in list1: if (item not in list3): list3.append(item) for item in list2: if (item not in list3): return list3 list3.append(item)

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 Programming Questions!