Question: Problem: Given two lists, write a program with a function that takes these two lists as the input arguments and returns the list of all

Problem: Given two lists, write a program with a function that takes these two lists as the input arguments and returns the list of all the elements in the first list that occur in the second list. The returned list shall not contain duplicate elements. Your main program will allow the user to enter two lists of numbers and end the program by inputting a blank line for list 1.
List 1: 1336
List 2: 3421213
Output: [1,3]
List 1: 3421213
List 2: 5678
Output: []
List 1:
Answer: Copy your code in the space given below and insert screenshots of your program output for the following two scenarios:
List 1: 0123123233
List 2: 246135
List 1: 11223344
List 2: 876543210

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!