Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given three python lists list1 , list2 , and list3 , write python program to create two new lists: InList1 , InList2 , and Common

Given three python lists list1, list2, and list3, write python program to create two new lists: InList1, InList2, and Common. You can assume that each of the three lists: list1, list2, and list3, has no duplications. [you cant use concept of sets in python to solve this problem]

Items which are in list1 but not in list2 and not in list3 should be stored in InList1.

Items which are in list2 but not in list1 and not in list3 should be stored in InList2.

Common should be items which are in all three lists.

For example, if list1 = [1,2,3,4], list2=[2,3,4,6,7], and list3=[3,4,5]

InList1 should be [1]

InList2 should be [6,7]

Common should be [3,4]

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

Database Programming Languages 12th International Symposium Dbpl 2009 Lyon France August 2009 Proceedings Lncs 5708

Authors: Philippa Gardner ,Floris Geerts

2009th Edition

3642037925, 978-3642037924

More Books

Students also viewed these Databases questions

Question

what are common data types used to define columns in sql

Answered: 1 week ago

Question

Question Can a self-employed person adopt a profit sharing plan?

Answered: 1 week ago