Set in Python MCQs Exercise I
Ques 1
Set
Set is a.....
A Mutable Datatype.
B Immutable Datatype.
C Both (a) and (b)
D None of these
Ques 2
Set
What is the correct syntax of Sets?
A se={}
B se={1,2,3,4}
C Both (a) and (b)
D None of these
Ques 3
Set
What is the output of the following Python Code?
se={1,2,3,4,5,6}
print(se[-1])
Ques 4
Set
What is the output of the following Python Code?
se={11,12,13}
se.add(14)
print(se)
A {11,12,13}
B Set is immutable.
C {11,12,13,14}
D Error
Ques 5
Set
What is the output of the following Python Code?
se={11,12,13}
se.push(14)
print(se)
A {11,12,13}
B Set is immutable.
C {11,12,13,14}
D Error