31. What is the purpose of the issuperset() method for sets?
32. Is the following Python code valid?
>>> a=frozenset([5,6,7])
>>> a
>>> a.add(5)
>>> a=frozenset([5,6,7])
>>> a
>>> a.add(5)
33. What will be the output of the following Python code?
s1={1, 2, 3, 8}
s2={3, 4, 5, 6}
s1|s2
s1.union(s2)
s1={1, 2, 3, 8}
s2={3, 4, 5, 6}
s1|s2
s1.union(s2)
34. Which of these about a set is not true?
35. What will be the output of the following Python code?
a=set('abc')
b=set('def')
b.intersection_update(a)
a
b
a=set('abc')
b=set('def')
b.intersection_update(a)
a
b
36. What is the purpose of the intersection() method for sets?
37. What will be the output of the following Python code?
>>> a={1,2,3}
>>> b=a
>>> b.remove(3)
>>> a
>>> a={1,2,3}
>>> b=a
>>> b.remove(3)
>>> a
38. The . . . . . . . . function removes the first element of a set and the last element of a list.
39. What will be the output of the following Python code?
>>> a={4,5,6}
>>> b={2,8,6}
>>> a+b
>>> a={4,5,6}
>>> b={2,8,6}
>>> a+b