ExamVeda
Login
Home
31
What is the purpose of the issuperset() method for sets?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
32
Is the following Python code valid?
>>> a=frozenset([5,6,7])
>>> a
>>> a.add(5)
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
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)
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
34
Which of these about a set is not true?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
35
What will be the output of the following Python code?
a=set('abc')
b=set('def')
b.intersection_update(a)
a
b
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
36
What is the purpose of the intersection() method for sets?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
37
What will be the output of the following Python code?
>>> a={1,2,3}
>>> b=a
>>> b.remove(3)
>>> a
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
38
The . . . . . . . . function removes the first element of a set and the last element of a list.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
39
What will be the output of the following Python code?
>>> a={4,5,6}
>>> b={2,8,6}
>>> a+b
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
40
Which of the following lines of code will result in an error?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board