Question 1
What happens if you try to add a duplicate element to a set in python?
Question 2
How do you check if an element is present in a set in python?
Question 3
Which of the following is not a valid set method in python?
Question 4
What is the result of the following set operation?
Question 5
What is the output of the following code snippet?
my_set={1, 2, 3, 4}
my_set.discard(5)
print(my_set)
Question 6
Which of the following methods can be used to remove an element from a set in python?
Question 8
What is the purpose of using a frozenset in python?
Question 9
Which of the following operations can be performed on sets in python?
Question 10
Which of the following is a valid way to create an empty set in python?