Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm struggling to get my list to overlap and delete duplicates. I need help please and I'm suppose to implement this using python First you

I'm struggling to get my list to overlap and delete duplicates. I need help please and I'm suppose to implement this using python

image text in transcribed

First you ill ask user to input two lists. The input can be numbers or strings and you can assume there is no duplicate values. The program will then perform the following operations on two lists 1. Define a new list that contains all the overlapping elements between two lists 2. Define a new list that contains all the elements resulting from subtracting the second list from the first one For e.g.: List1 = [1, 2, 3, 5] List2 [2,3, 4, 10, 9] Overlapping list = [2,3] Subtraction list = [1,5] For this lab, you are expected to organize everything in functions. You will have a main0 functionality & Two other user defined functions to perform the overlap and subtraction operation. .You are not expected to use built-in functions that perform the above defined tasks directly. Of course you are allowed to use any built-in keywords like for, in, any conditionals etc and regular built in functions like print, raw_input and so on. 1. Suppose your list contains duplicate elements, write another user-defined function to remove the duplicates from the lists and then perform the overlap and subtraction operations. For e.g List1a", 'b','a", "e", "f] Then after removing the duplicates it should be: [ab', 'e, T]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions