Question: Python- write a function list_diff() that is passed the running list of integers and a second list of integers. (Prompt for and read the second

Python- write a function list_diff() that is passed the running list of integers and a second list of integers. (Prompt for and read the second list of integers before the function call and pass it (and the original list) to the function.) The function should return a list of all the integers in the running list that are not also in the second list. For example, if the two lists are [5, 1, 4, 2] (as the running list) and [6, 1, 4, 3] (as the second list), the function should return [5, 2]. Use filter and convert the filter application to a list.

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!