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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started