Question: 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

 Write a program that first creates an empty set object my_set1

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!