Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Program Create a function inter(list1, list2) that takes in two lists, makes them sets, and returns their intersection. inter([1, 1, 2, 3, 5], [1,

Python Program

Create a function inter(list1, list2) that takes in two lists, makes them sets, and returns their intersection.

inter([1, 1, 2, 3, 5], [1, 1, 4, 5, 5]) should return [1, 5]

inter([4, 5, 5, 4], [1, 2, 3, 1]) should return [ ] inter([3, 4, 5], [4, 4, 3, 5]) should return [3, 4, 5]

Do the same for union(list1, list2) that returns their union.

union([1,1,2,3], [3, 3, 3, 4]) should return [1, 2, 3, 4]

union([1, 3], [Tom]) should return [1, 3, Tom]

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

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions

Question

What is Centrifugation?

Answered: 1 week ago

Question

To find integral of ?a 2 - x 2

Answered: 1 week ago

Question

To find integral of e 3x sin4x

Answered: 1 week ago

Question

To find the integral of 3x/(x - 1)(x - 2)(x - 3)

Answered: 1 week ago

Question

What are Fatty acids?

Answered: 1 week ago