Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that first creates an empty set object my_set1 Then, perform the following tasks: method. (2) Add a tuple of strings with values

image text in transcribed

Write a program that first creates an empty set object my_set1 Then, perform the following tasks: method. (2) Add a tuple of strings with values a, b, ab, 1, into my_set1, using the update(argument) method. (3) Delete string 'a' from my_set1, using the remove(argument) methood (4) Delete string 'b' from my_set1, using the discard(argument) method. (5) Create another set my_set2, with the string 'abd1ad' as argument. 6) Print out current my_set1 and my_set2, as well as the union and intersection of the two sets my_setl: (1, 'ab', '1' my set2: 'a', "d', "b', '1' union: ['a', 1, "d', 'b', ab', '1'1 intersection: '1

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

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions

Question

what is a peer Group? Importance?

Answered: 1 week ago