Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started